home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / updates / update21.zoo / include / diffh next >
Encoding:
Text File  |  1992-06-03  |  124.7 KB  |  5,132 lines

  1. *** 1.41    1992/04/13 15:53:11
  2. --- PatchLev.h    1992/06/03 15:26:53
  3. ***************
  4. *** 1,5 ****
  5.   
  6. ! #define    PatchLevel "80"
  7.   
  8.   /*
  9.    *
  10. --- 1,5 ----
  11.   
  12. ! #define    PatchLevel "81"
  13.   
  14.   /*
  15.    *
  16. *** 1.7    1992/01/29 21:08:08
  17. --- aesbind.h    1992/06/03 15:26:54
  18. ***************
  19. *** 6,12 ****
  20.   # include <compiler.h>
  21.   #endif
  22.   
  23. ! #if defined(__cplusplus)
  24.   extern "C" {
  25.   #endif
  26.   
  27. --- 6,12 ----
  28.   # include <compiler.h>
  29.   #endif
  30.   
  31. ! #ifdef __cplusplus
  32.   extern "C" {
  33.   #endif
  34.   
  35. ***************
  36. *** 149,155 ****
  37.   __EXTERN int     rc_intersect __PROTO((GRECT *r1, GRECT *r2));
  38.   __EXTERN int    *grect_to_array __PROTO((GRECT *area, int *array));
  39.   
  40. ! #if defined(__cplusplus)
  41.   }
  42.   #endif
  43.   
  44. --- 149,155 ----
  45.   __EXTERN int     rc_intersect __PROTO((GRECT *r1, GRECT *r2));
  46.   __EXTERN int    *grect_to_array __PROTO((GRECT *area, int *array));
  47.   
  48. ! #ifdef __cplusplus
  49.   }
  50.   #endif
  51.   
  52. *** 1.1    1991/06/23 17:12:30
  53. --- alloc.h    1992/06/03 15:26:54
  54. ***************
  55. *** 1,44 ****
  56. ! #ifndef _MEMORY_H
  57. ! #define _MEMORY_H
  58.   
  59. ! #ifndef _COMPILER_H
  60. ! #include <compiler.h>
  61. ! #endif
  62. ! #if defined(__cplusplus)
  63. ! extern "C" {
  64. ! #endif
  65. ! #ifndef _SIZE_T
  66. ! #define _SIZE_T __SIZE_TYPEDEF__
  67. ! typedef _SIZE_T size_t;
  68. ! #endif
  69. ! #ifdef __GNUC__
  70. ! #  ifndef alloca
  71. ! #    define alloca __builtin_alloca
  72. ! #  endif
  73. ! #endif
  74. ! __EXTERN void *malloc __PROTO((size_t n));
  75. ! __EXTERN void free __PROTO((void *param));
  76. ! __EXTERN void *realloc __PROTO((void *_r, size_t n));
  77. ! __EXTERN void *calloc __PROTO((size_t n, size_t sz));
  78. ! __EXTERN void _malloczero __PROTO((int yes));
  79. ! __EXTERN void _mallocChunkSize __PROTO((size_t siz));
  80. ! #ifndef alloca
  81. ! #  ifndef __cplusplus
  82. !     __EXTERN void *alloca __PROTO((size_t));
  83. ! #  else
  84. !     __EXTERN void *alloca __PROTO((long unsigned int));
  85. ! #  endif
  86. ! #endif
  87. ! __EXTERN void *mlalloc __PROTO((long));
  88. ! __EXTERN void *relalloc __PROTO((void *, long));
  89. ! __EXTERN void *clalloc __PROTO((long, long));
  90. ! #if defined(__cplusplus)
  91. ! }
  92. ! #endif
  93. ! #endif /* _MEMORY_H */
  94. --- 1,6 ----
  95. ! #ifndef _ALLOC_H
  96. ! #define _ALLOC_H
  97.   
  98. ! #include <memory.h>
  99. !   
  100. ! #endif /* _ALLOC_H */
  101. *** 1.11    1992/03/06 19:29:17
  102. --- assert.h    1992/06/03 15:26:54
  103. ***************
  104. *** 12,33 ****
  105.   #include <compiler.h>
  106.   #endif
  107.   
  108. ! #if defined(__cplusplus)
  109.   extern "C" {
  110.   #endif
  111.   
  112.   
  113. ! __EXTERN void __eprintf __PROTO((const char *, const char *, const long,
  114. !                 const char *));
  115.   __EXTERN __EXITING abort __PROTO((void));
  116.   
  117. ! #if defined(__cplusplus)
  118.   }
  119.   #endif
  120.   
  121. - #ifndef __FAILED
  122. - #define __FAILED "assertion `%s' failed at line '%ld' of file %s\n"
  123. - #endif
  124.   
  125.   #ifdef NDEBUG
  126.   #define    assert(cond)
  127. --- 12,30 ----
  128.   #include <compiler.h>
  129.   #endif
  130.   
  131. ! #ifdef __cplusplus
  132.   extern "C" {
  133.   #endif
  134.   
  135.   
  136. ! __EXTERN void __eprintf __PROTO((const char *expression, const long line,
  137. !                  const char *filename));
  138.   __EXTERN __EXITING abort __PROTO((void));
  139.   
  140. ! #ifdef __cplusplus
  141.   }
  142.   #endif
  143.   
  144.   
  145.   #ifdef NDEBUG
  146.   #define    assert(cond)
  147. ***************
  148. *** 37,47 ****
  149.   #if __STDC__
  150.   #define assert(cond) \
  151.   if(!(cond)) \
  152. !     { __eprintf( __FAILED, #cond,(long)(__LINE__), __FILE__); abort(); }
  153.   
  154.   #define assertval(cond) \
  155.   ((cond) ? 1 : \
  156. !     ( __eprintf( __FAILED, #cond,(long)(__LINE__), __FILE__), abort(), 0 ))
  157.   #else
  158.   
  159.   
  160. --- 34,44 ----
  161.   #if __STDC__
  162.   #define assert(cond) \
  163.   if(!(cond)) \
  164. !     { __eprintf(#cond,(long)(__LINE__), __FILE__); abort(); }
  165.   
  166.   #define assertval(cond) \
  167.   ((cond) ? 1 : \
  168. !     ( __eprintf(#cond,(long)(__LINE__), __FILE__), abort(), 0 ))
  169.   #else
  170.   
  171.   
  172. ***************
  173. *** 60,70 ****
  174.   
  175.   #define assert(cond) \
  176.   if(!(cond)) \
  177. !     { __eprintf(__FAILED, "cond", (long)(__LINE__), __FILE__); abort(); }
  178.   
  179.   #define assertval(cond) \
  180.   ((cond) ? 1:  \
  181. !     ( __eprintf(__FAILED, "cond", (long)(__LINE__), __FILE__), abort(), 0))
  182.   
  183.   #endif /* __STDC__ */
  184.   
  185. --- 57,67 ----
  186.   
  187.   #define assert(cond) \
  188.   if(!(cond)) \
  189. !     { __eprintf("cond", (long)(__LINE__), __FILE__); abort(); }
  190.   
  191.   #define assertval(cond) \
  192.   ((cond) ? 1:  \
  193. !     ( __eprintf("cond", (long)(__LINE__), __FILE__), abort(), 0))
  194.   
  195.   #endif /* __STDC__ */
  196.   
  197. *** 1.7    1991/12/26 16:23:20
  198. --- basepage.h    1992/06/03 15:26:54
  199. ***************
  200. *** 5,11 ****
  201.   #ifndef _BASEP_H
  202.   #define    _BASEP_H
  203.   
  204. ! #if defined(__cplusplus)
  205.   extern "C" {
  206.   #endif
  207.   
  208. --- 5,11 ----
  209.   #ifndef _BASEP_H
  210.   #define    _BASEP_H
  211.   
  212. ! #ifdef __cplusplus
  213.   extern "C" {
  214.   #endif
  215.   
  216. ***************
  217. *** 38,44 ****
  218.   
  219.   extern    BASEPAGE    *_base;
  220.   
  221. ! #if defined(__cplusplus)
  222.   }
  223.   #endif
  224.   
  225. --- 38,44 ----
  226.   
  227.   extern    BASEPAGE    *_base;
  228.   
  229. ! #ifdef __cplusplus
  230.   }
  231.   #endif
  232.   
  233. *** 1.6    1992/04/13 15:53:11
  234. --- compiler.h    1992/06/03 15:26:54
  235. ***************
  236. *** 68,102 ****
  237.   
  238.   #ifndef __NULL
  239.   #  ifdef __MSHORT__
  240. ! #    define __NULL ((void *)0L)
  241.   #  else
  242. !      /* avoid complaints about misuse of NULL :-)*/
  243.   #    define __NULL (0)
  244.   #  endif
  245.   #endif
  246.   
  247. ! #if __STDC__ || defined(__cplusplus)
  248. ! # ifndef __NO_PROTO__
  249. ! #  define __PROTO(x) x
  250. ! # endif
  251.   # define __EXTERN
  252.   #else
  253. ! # define __EXTERN extern
  254.   /*
  255.    * fudge non-ANSI compilers to be like ANSI
  256.    */
  257. ! # define const
  258. ! # define volatile
  259.   
  260. ! # ifdef __NEED_VOID__
  261.   typedef char void;    /* so that (void *) is the same as (char *) */
  262.       /* also lets us know that foo() {...} and void foo() {...} are
  263.          different */
  264. ! # endif
  265. ! #endif /* __STDC__ */
  266.   
  267.   #ifndef __PROTO
  268.   #define __PROTO(x) ()
  269.   #endif
  270.   
  271.   #endif /* _COMPILER_H */
  272. --- 68,112 ----
  273.   
  274.   #ifndef __NULL
  275.   #  ifdef __MSHORT__
  276. ! #    define __NULL ((void *)0)
  277.   #  else
  278. !      /* avoid complaints about misuse of NULL :-) */
  279.   #    define __NULL (0)
  280.   #  endif
  281.   #endif
  282.   
  283. ! #ifdef __cplusplus
  284.   # define __EXTERN
  285. + # define __PROTO(x) x
  286.   #else
  287. ! # ifdef __STDC__
  288. ! #  ifndef __NO_PROTO__
  289. ! #    define __PROTO(x) x
  290. ! #  endif
  291. ! #  define __EXTERN
  292. ! # else
  293. ! #  define __EXTERN extern
  294.   /*
  295.    * fudge non-ANSI compilers to be like ANSI
  296.    */
  297. ! #  define const
  298. ! #  define volatile
  299.   
  300. ! #  ifdef __NEED_VOID__
  301.   typedef char void;    /* so that (void *) is the same as (char *) */
  302.       /* also lets us know that foo() {...} and void foo() {...} are
  303.          different */
  304. ! #  endif
  305. ! # endif /* __STDC__ */
  306. ! #endif /* __cplusplus */
  307.   
  308.   #ifndef __PROTO
  309.   #define __PROTO(x) ()
  310.   #endif
  311. + /* macros for POSIX support */
  312. + #define _UID_T unsigned short
  313. + #define _GID_T unsigned short
  314. + #define _PID_T int
  315.   
  316.   #endif /* _COMPILER_H */
  317. *** 1.11    1992/03/06 19:29:17
  318. --- ctype.h    1992/06/03 15:26:55
  319. ***************
  320. *** 9,15 ****
  321.   #include <compiler.h>
  322.   #endif
  323.   
  324. ! #if defined(__cplusplus)
  325.   extern "C" {
  326.   #endif
  327.   
  328. --- 9,15 ----
  329.   #include <compiler.h>
  330.   #endif
  331.   
  332. ! #ifdef __cplusplus
  333.   extern "C" {
  334.   #endif
  335.   
  336. ***************
  337. *** 83,89 ****
  338.   __EXTERN int    toupper    __PROTO((int));
  339.   __EXTERN int     tolower    __PROTO((int));
  340.   
  341. ! #if defined(__cplusplus)
  342.   }
  343.   #endif
  344.   
  345. --- 83,89 ----
  346.   __EXTERN int    toupper    __PROTO((int));
  347.   __EXTERN int     tolower    __PROTO((int));
  348.   
  349. ! #ifdef __cplusplus
  350.   }
  351.   #endif
  352.   
  353. *** 1.7    1991/09/24 17:05:40
  354. --- curses.h    1992/06/03 15:26:55
  355. ***************
  356. *** 37,52 ****
  357.   
  358.   #include <termcap.h>
  359.   
  360. ! #if defined(__cplusplus)
  361.   extern "C" {
  362.   #endif
  363.   
  364.   # define    bool    char
  365.   # define    reg    register
  366.   
  367.   # define    TRUE    (1)
  368.   # define    FALSE    (0)
  369.   # define    ERR    (0)
  370.   # define    OK    (1)
  371.   
  372. --- 37,53 ----
  373.   
  374.   #include <termcap.h>
  375.   
  376. ! #ifdef __cplusplus
  377.   extern "C" {
  378.   #endif
  379.   
  380.   # define    bool    char
  381.   # define    reg    register
  382.   
  383. + #ifndef TRUE
  384.   # define    TRUE    (1)
  385.   # define    FALSE    (0)
  386. + #endif
  387.   # define    ERR    (0)
  388.   # define    OK    (1)
  389.   
  390. ***************
  391. *** 74,80 ****
  392.    */
  393.   
  394.   #ifdef HZ
  395. ! #  undef HZ    /* in case they included sys/param.h */
  396.   #endif
  397.   
  398.   extern bool     AM, BS, CA, DA, DB, EO, HC, HZ, IN, MI, MS, NC, NS, OS, UL,
  399. --- 75,81 ----
  400.    */
  401.   
  402.   #ifdef HZ
  403. ! #undef HZ    /* in case they included sys/param.h */
  404.   #endif
  405.   
  406.   extern bool     AM, BS, CA, DA, DB, EO, HC, HZ, IN, MI, MS, NC, NS, OS, UL,
  407. ***************
  408. *** 287,294 ****
  409.   __EXTERN char *unctrl __PROTO((int c));
  410.   #endif
  411.   
  412. ! #if defined(__cplusplus)
  413.   }
  414.   #endif
  415.   
  416. ! # endif
  417. --- 288,295 ----
  418.   __EXTERN char *unctrl __PROTO((int c));
  419.   #endif
  420.   
  421. ! #ifdef __cplusplus
  422.   }
  423.   #endif
  424.   
  425. ! #endif
  426. *** 1.5    1991/06/20 02:21:30
  427. --- device.h    1992/06/03 15:26:56
  428. ***************
  429. *** 11,17 ****
  430.   #include <types.h>
  431.   #endif
  432.   
  433. ! #if defined(__cplusplus)
  434.   extern "C" {
  435.   #endif
  436.   
  437. --- 11,17 ----
  438.   #include <types.h>
  439.   #endif
  440.   
  441. ! #ifdef __cplusplus
  442.   extern "C" {
  443.   #endif
  444.   
  445. ***************
  446. *** 44,50 ****
  447.   __EXTERN struct _device *_dev_dosname __PROTO((const char *dosnm));
  448.   __EXTERN struct _device *_dev_unxname __PROTO((const char *unm));
  449.   
  450. ! #if defined(__cplusplus)
  451.   }
  452.   #endif
  453.   
  454. --- 44,50 ----
  455.   __EXTERN struct _device *_dev_dosname __PROTO((const char *dosnm));
  456.   __EXTERN struct _device *_dev_unxname __PROTO((const char *unm));
  457.   
  458. ! #ifdef __cplusplus
  459.   }
  460.   #endif
  461.   
  462. *** 1.9    1991/06/20 02:21:30
  463. --- dirent.h    1992/06/03 15:26:56
  464. ***************
  465. *** 12,21 ****
  466.   #endif
  467.   
  468.   #ifndef NAME_MAX
  469. ! #  include <limits.h>
  470.   #endif
  471.   
  472. ! #if defined(__cplusplus)
  473.   extern "C" {
  474.   #endif
  475.   
  476. --- 12,21 ----
  477.   #endif
  478.   
  479.   #ifndef NAME_MAX
  480. ! # include <limits.h>
  481.   #endif
  482.   
  483. ! #ifdef __cplusplus
  484.   extern "C" {
  485.   #endif
  486.   
  487. ***************
  488. *** 26,33 ****
  489.   
  490.   struct dirent {
  491.          long            d_ino;          /* garbage under TOS */
  492. !        off_t           d_off;          /* in TOS, entry in list */
  493. !        short           d_reclen;       /* in TOS, length of d_name */
  494.   /* the following (except for d_name) are unique to TOS */
  495.          struct dirent   *d_next;        /* ptr to next struct dirent in list */
  496.          unsigned char   d_attribute;    /* file modes from Fsfirst()  */
  497. --- 26,34 ----
  498.   
  499.   struct dirent {
  500.          long            d_ino;          /* garbage under TOS */
  501. !        off_t           d_off;          /* position in directory  */
  502. !        short           d_reclen;       /* for us, length of d_name */
  503. ! #ifndef __MINT__
  504.   /* the following (except for d_name) are unique to TOS */
  505.          struct dirent   *d_next;        /* ptr to next struct dirent in list */
  506.          unsigned char   d_attribute;    /* file modes from Fsfirst()  */
  507. ***************
  508. *** 34,41 ****
  509. --- 35,46 ----
  510.          unsigned short  d_time, d_date; /* TOS date and time for file */
  511.          long            d_size;         /* file size */
  512.          char            d_name[1];
  513. + #else
  514. +        char            d_name[NAME_MAX+1];
  515. + #endif
  516.   };
  517.   
  518. + #ifndef __MINT__
  519.   typedef struct _DIR {
  520.          struct dirent *D_list;          /* list of directory entries */
  521.          struct dirent *D_curpos;        /* current position in list  */
  522. ***************
  523. *** 43,48 ****
  524. --- 48,69 ----
  525.          struct _DIR   *D_nxtdir;        /* next DIR in opendir chain */
  526.   } DIR;
  527.   
  528. + #else
  529. + typedef struct _DIR {
  530. +     short    status;        /* status of the search so far: */
  531. + #define _INSEARCH    0    /* need to call Fsnext for a new entry */
  532. + #define _STARTSEARCH    1    /* Fsfirst called once, successfully */
  533. + #define _NMFILE        2    /* no more files in directory */
  534. +     char    dta[44];    /* TOS DTA for this directory */
  535. +     char    *dirname;    /* directory of the search (used under
  536. +                    TOS for rewinddir) */
  537. +     struct dirent buf;    /* dirent struct for this directory */
  538. + } DIR;
  539. + #endif /* __MINT__ */
  540.   #define DIRENTSIZ(x) (sizeof(struct dirent) + (x) + 1)
  541.   
  542.   /* allow BSD emulation via sys/dir.h */
  543. ***************
  544. *** 64,70 ****
  545.   __EXTERN void        rewinddir __PROTO((DIR *dirp));
  546.   __EXTERN int        closedir  __PROTO((DIR *dirp));
  547.   
  548. ! #if defined(__cplusplus)
  549.   }
  550.   #endif
  551.   
  552. --- 85,91 ----
  553.   __EXTERN void        rewinddir __PROTO((DIR *dirp));
  554.   __EXTERN int        closedir  __PROTO((DIR *dirp));
  555.   
  556. ! #ifdef __cplusplus
  557.   }
  558.   #endif
  559.   
  560. *** 1.9    1991/06/20 02:21:30
  561. --- errno.h    1992/06/03 15:26:56
  562. ***************
  563. *** 1,7 ****
  564.   #ifndef _ERRNO_H
  565.   #define _ERRNO_H
  566.   
  567. ! #if defined(__cplusplus)
  568.   extern "C" {
  569.   #endif
  570.   
  571. --- 1,11 ----
  572.   #ifndef _ERRNO_H
  573.   #define _ERRNO_H
  574.   
  575. ! #ifndef _COMPILER_H
  576. ! #include <compiler.h>
  577. ! #endif
  578. ! #ifdef __cplusplus
  579.   extern "C" {
  580.   #endif
  581.   
  582. ***************
  583. *** 56,64 ****
  584.   #define    ENMFILES     49        /* no more files (fsnext) */
  585.   #define ENMFIL         49        /* no more files (from fsnext) */
  586.   
  587. - #define EDOM         62
  588. - #define ERANGE         63
  589.   #define    EBADARG         64        /* range error/context unknown */
  590.   #define    EINTERNAL     65        /* internal error */
  591.   #define EINTRN         EINTERNAL    /*    "       "   */
  592. --- 60,65 ----
  593. ***************
  594. *** 67,77 ****
  595.   #define    ESBLOCK         67        /* set block failed/growth restraints*/
  596.   #define EGSBF         ESBLOCK    /* or memory block growth failure */
  597.                       /* (gap) */
  598. ! #define    EEXIST         80        /* file exists (open) */
  599. ! #define    ENAMETOOLONG     81        /* file exists (open) */
  600. ! #define    ENOTTY         82        /* not a tty (ioctl) */
  601. ! #define EAGAIN        EDRNRDY        /* try again later */
  602. ! #define ENOTDIR        EPATH        /* preliminary */
  603.   
  604.   #define EINTR            128        /* this *should* be fake */
  605.   
  606. --- 68,79 ----
  607.   #define    ESBLOCK         67        /* set block failed/growth restraints*/
  608.   #define EGSBF         ESBLOCK    /* or memory block growth failure */
  609.                       /* (gap) */
  610. ! # define EMLINK         80        /* too many symbolic links */
  611. ! # define EEXIST         85        /* file exists, try again later */
  612. ! # define ENAMETOOLONG      86        /* name too long */
  613. ! # define ENOTTY         87
  614. ! # define ERANGE         88
  615. ! # define EDOM         89
  616.   
  617.   #define EINTR            128        /* this *should* be fake */
  618.   
  619. ***************
  620. *** 79,85 ****
  621.   extern    int    sys_nerr;
  622.   extern    char *    sys_errlist[];
  623.   
  624. ! #if defined(__cplusplus)
  625.   }
  626.   #endif
  627.   
  628. --- 81,87 ----
  629.   extern    int    sys_nerr;
  630.   extern    char *    sys_errlist[];
  631.   
  632. ! #ifdef __cplusplus
  633.   }
  634.   #endif
  635.   
  636. *** 1.14    1992/01/29 21:08:08
  637. --- fcntl.h    1992/06/03 15:26:56
  638. ***************
  639. *** 5,11 ****
  640.   #ifndef    _FCNTL_H
  641.   #define    _FCNTL_H
  642.   
  643. ! #if defined(__cplusplus)
  644.   extern "C" {
  645.   #endif
  646.   
  647. --- 5,15 ----
  648.   #ifndef    _FCNTL_H
  649.   #define    _FCNTL_H
  650.   
  651. ! #ifndef _COMPILER_H
  652. ! #include <compiler.h>
  653. ! #endif
  654. ! #ifdef __cplusplus
  655.   extern "C" {
  656.   #endif
  657.   
  658. ***************
  659. *** 24,30 ****
  660.   
  661.   #define    O_NDELAY    0x100        /* Non-blocking I/O */
  662.   #ifdef __MINT__
  663. ! #  define O_SYNC    0x00        /* sync after writes (not implemented) */
  664.   #endif
  665.   
  666.   /* the following flags are not passed to the OS */
  667. --- 28,34 ----
  668.   
  669.   #define    O_NDELAY    0x100        /* Non-blocking I/O */
  670.   #ifdef __MINT__
  671. ! # define O_SYNC        0x00        /* sync after writes (not implemented) */
  672.   #endif
  673.   
  674.   /* the following flags are not passed to the OS */
  675. ***************
  676. *** 32,42 ****
  677.   #define    O_TRUNC        0x400        /* make file 0 length */
  678.   #define    O_EXCL        0x800        /* error if file exists */
  679.   #define    O_APPEND    0x1000        /* position at EOF */
  680. ! #define O_PIPE        0x2000        /* serial pipe     */
  681.   
  682.   /*
  683. !  * access
  684.    */
  685.   #define    F_OK            0
  686.   #define    X_OK            1
  687. --- 36,47 ----
  688.   #define    O_TRUNC        0x400        /* make file 0 length */
  689.   #define    O_EXCL        0x800        /* error if file exists */
  690.   #define    O_APPEND    0x1000        /* position at EOF */
  691. ! #ifndef __MINT__
  692. ! # define O_PIPE        0x2000        /* serial pipe     */
  693. ! #endif
  694.   
  695.   /*
  696. !  * defines for the access() function
  697.    */
  698.   #define    F_OK            0
  699.   #define    X_OK            1
  700. ***************
  701. *** 43,48 ****
  702. --- 48,56 ----
  703.   #define    W_OK            2
  704.   #define    R_OK            4
  705.   
  706. + /*
  707. +  * defines for fcntl()
  708. +  */
  709.   #define    F_DUPFD        0    /* Duplicate fildes */
  710.   #define    F_GETFD        1    /* Get fildes flags */
  711.   #define    F_SETFD        2    /* Set fildes flags */
  712. ***************
  713. *** 65,75 ****
  714.   };
  715.   #endif /* __MINT__ */
  716.   
  717. - /* defs for handle frob */
  718.   
  719. ! #define __NHANDLES    80
  720.   
  721. ! #ifndef __MINT__
  722.   struct __open_file {
  723.       unsigned short append:1;    /* 1 if O_APPEND set for this file */
  724.       unsigned short nodelay:1;    /* 1 if O_NDELAY set for this file */
  725. --- 73,91 ----
  726.   };
  727.   #endif /* __MINT__ */
  728.   
  729.   
  730. ! #ifdef __MINT__
  731.   
  732. ! #define __NHANDLES 40
  733. ! struct __open_file {
  734. !     short    status;        /* whether or not it's a tty */
  735. !     short    flags;        /* if a tty, its flags */
  736. ! };
  737. ! #else
  738. ! #define __NHANDLES    80
  739.   struct __open_file {
  740.       unsigned short append:1;    /* 1 if O_APPEND set for this file */
  741.       unsigned short nodelay:1;    /* 1 if O_NDELAY set for this file */
  742. ***************
  743. *** 79,92 ****
  744.       char       *filename;    /* filename of open file */
  745.   };
  746.   
  747. ! #else /* __MINT__ */
  748. ! struct __open_file {
  749. !         short   status;         /* whether or not it's a tty */
  750. !         short   flags;          /* if a tty, its flags */
  751. ! };
  752. ! #endif /* __MINT */
  753.   
  754.   extern struct __open_file __open_stat[__NHANDLES];
  755.     /* NOTE: this array is indexed by (__OPEN_INDEX(fd)) */
  756. --- 95,101 ----
  757.       char       *filename;    /* filename of open file */
  758.   };
  759.   
  760. ! #endif /* __MINT__ */
  761.   
  762.   extern struct __open_file __open_stat[__NHANDLES];
  763.     /* NOTE: this array is indexed by (__OPEN_INDEX(fd)) */
  764. ***************
  765. *** 109,122 ****
  766.   #define FH_ISAFILE    2
  767.   
  768.   
  769. - #ifndef _COMPILER_H
  770. - #include <compiler.h>
  771. - #endif
  772.   __EXTERN int fcntl __PROTO((int f, int cmd, ...));
  773.   
  774. ! #if defined(__cplusplus)
  775.   }
  776.   #endif
  777.   
  778. --- 118,126 ----
  779.   #define FH_ISAFILE    2
  780.   
  781.   
  782.   __EXTERN int fcntl __PROTO((int f, int cmd, ...));
  783.   
  784. ! #ifdef __cplusplus
  785.   }
  786.   #endif
  787.   
  788. *** 1.4    1992/03/06 19:29:17
  789. --- file.h    1992/06/03 15:26:57
  790. ***************
  791. *** 1,19 ****
  792.   #ifndef _FILE_H
  793.   #define _FILE_H
  794.   
  795. ! #ifdef __MINT__
  796. ! #  ifndef _COMPILER_H
  797. ! #  include <compiler.h>
  798. ! #  endif
  799.   
  800. !    /* lockf() comands */
  801. ! #  define LOCK_SH    1    /* shared lock */
  802. ! #  define LOCK_EX    2    /* exclusive lock */
  803. ! #  define LOCK_NB    4    /* non-blocking */
  804. ! #  define LOCK_UN    8    /* unlock */
  805.   
  806. !   __EXTERN int        flock    __PROTO((int, int));
  807. ! #endif /* __MINT__ */
  808.   
  809.   #include <fcntl.h>
  810.   
  811. --- 1,19 ----
  812.   #ifndef _FILE_H
  813.   #define _FILE_H
  814.   
  815. ! #ifndef _COMPILER_H
  816. ! #include <compiler.h>
  817. ! #endif
  818.   
  819. ! #ifdef __MINT__
  820. ! /* lockf() comands */
  821. ! #define LOCK_SH    1    /* shared lock */
  822. ! #define LOCK_EX    2    /* exclusive lock */
  823. ! #define LOCK_NB    4    /* non-blocking */
  824. ! #define LOCK_UN    8    /* unlock */
  825.   
  826. ! __EXTERN int        flock    __PROTO((int, int));
  827. ! #endif
  828.   
  829.   #include <fcntl.h>
  830.   
  831. *** 1.6    1992/04/13 15:53:11
  832. --- float.h    1992/06/03 15:26:57
  833. ***************
  834. *** 11,16 ****
  835. --- 11,75 ----
  836.   #ifndef _FLOAT_H
  837.   #define _FLOAT_H
  838.   
  839. + #ifndef _COMPILER_H
  840. + #include <compiler.h>
  841. + #endif
  842. + #ifdef __SOZOBON__
  843. + /* 4/19/92 sb
  844. +    These constants correspond to version 2.0 of David Brooks' floating point
  845. +    library, which Sozobon 1.33i uses. */
  846. +    /* Radix of exponent representation */
  847. + #define FLT_RADIX 2
  848. +    /* Number of base-FLT_RADIX digits in the mantissa of a float */
  849. + #define FLT_MANT_DIG 24
  850. +    /* Number of decimal digits of precision in a float */
  851. + #define FLT_DIG 7
  852. +    /* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown */
  853. + #define FLT_ROUNDS 1
  854. +    /* Minimum float x such that 1.0+x != 1.0 */
  855. + #define FLT_EPSILON ((float)1.192092891e-07)
  856. +    /* Minimum int x such that FLT_RADIX**(x-1) is a normalised float */
  857. + #define FLT_MIN_EXP (-63)
  858. +    /* Minimum normalised float */
  859. + #define FLT_MIN ((float)5.421010547e-20)
  860. +    /* Minimum int x such that 10**x is a normalised float */
  861. + #define FLT_MIN_10_EXP (-19)
  862. +    /* Maximum int x such that FLT_RADIX**(x-1) is a representable float */
  863. + #define FLT_MAX_EXP 64 
  864. +    /* Maximum float */
  865. + #define FLT_MAX ((float)9.2233715e18)
  866. +    /* Maximum int x such that 10**x is a representable float */
  867. + #define FLT_MAX_10_EXP 18
  868. + /* double is identical to float */
  869. + #define DBL_MANT_DIG    FLT_MANT_DIG
  870. + #define DBL_DIG        FLT_DIG
  871. + #define DBL_ROUNDS    FLT_ROUNDS
  872. + #define DBL_EPSILON    ((double)FLT_EPSILON)
  873. + #define DBL_MIN_EXP    FLT_MIN_EXP
  874. + #define DBL_MIN        ((double)FLT_MIN)
  875. + #define DBL_MIN_10_EXP    FLT_MIN_10_EXP
  876. + #define DBL_MAX_EXP    FLT_MAX_EXP
  877. + #define DBL_MAX        ((double)FLT_MAX)
  878. + #define DBL_MAX_10_EXP    FLT_MAX_10_EXP
  879. + /* so is long double */
  880. + #define LDBL_MANT_DIG    FLT_MANT_DIG
  881. + #define LDBL_DIG    FLT_DIG
  882. + #define LDBL_ROUNDS    FLT_ROUNDS
  883. + #define LDBL_EPSILON    ((long double)FLT_EPSILON)
  884. + #define LDBL_MIN_EXP    FLT_MIN_EXP
  885. + #define LDBL_MIN    ((long double)FLT_MIN)
  886. + #define LDBL_MIN_10_EXP    FLT_MIN_10_EXP
  887. + #define LDBL_MAX_EXP    FLT_MAX_EXP
  888. + #define LDBL_MAX    ((long double)FLT_MAX)
  889. + #define LDBL_MAX_10_EXP    FLT_MAX_10_EXP
  890. + #else /* __SOZOBON__ */
  891.   /* float.h */
  892.   /* Produced by config version 4.2, CWI, Amsterdam */
  893.   
  894. ***************
  895. *** 73,81 ****
  896.   #define LDBL_MAX_EXP 1024
  897.      /* Maximum long double */
  898.   /*#define LDBL_MAX 1.7976931348623157e+308L*/
  899. ! #define LDBL_MAX 1.7976931348623158e+308L
  900.      /* Maximum int x such that 10**x is a representable long double */
  901.   #define LDBL_MAX_10_EXP 308
  902.   
  903.   
  904.   #endif /* _FLOAT_H */
  905. --- 132,141 ----
  906.   #define LDBL_MAX_EXP 1024
  907.      /* Maximum long double */
  908.   /*#define LDBL_MAX 1.7976931348623157e+308L*/
  909. ! #define LDBL_MAX 1.7976931348623158e+308
  910.      /* Maximum int x such that 10**x is a representable long double */
  911.   #define LDBL_MAX_10_EXP 308
  912.   
  913. + #endif /* __SOZOBON__ */
  914.   
  915.   #endif /* _FLOAT_H */
  916. *** 1.5    1991/06/20 02:21:30
  917. --- ftw.h    1992/06/03 15:26:57
  918. ***************
  919. *** 8,14 ****
  920.   #ifndef _FTW_H
  921.   #define _FTW_H
  922.       
  923. ! #if defined(__cplusplus)
  924.   extern "C" {
  925.   #endif
  926.   
  927. --- 8,14 ----
  928.   #ifndef _FTW_H
  929.   #define _FTW_H
  930.       
  931. ! #ifdef __cplusplus
  932.   extern "C" {
  933.   #endif
  934.   
  935. ***************
  936. *** 17,26 ****
  937.   #define FTW_DNR        2    /* Something opendir(3) failed on    */
  938.   #define FTW_NS        3    /* Something stat(2) failed on        */
  939.   
  940.   __EXTERN int ftw
  941.       __PROTO((char *path, int (*fn)(char *, struct stat *, int), int param));
  942.   
  943. ! #if defined(__cplusplus)
  944.   }
  945.   #endif
  946.   
  947. --- 17,27 ----
  948.   #define FTW_DNR        2    /* Something opendir(3) failed on    */
  949.   #define FTW_NS        3    /* Something stat(2) failed on        */
  950.   
  951.   __EXTERN int ftw
  952.       __PROTO((char *path, int (*fn)(char *, struct stat *, int), int param));
  953.   
  954. ! #ifdef __cplusplus
  955.   }
  956.   #endif
  957.   
  958. *** 1.1    1991/12/26 16:23:20
  959. --- gdbm.h    1992/06/03 15:26:57
  960. ***************
  961. *** 27,32 ****
  962. --- 27,36 ----
  963.          
  964.   *************************************************************************/
  965.   
  966. + #ifdef __cplusplus
  967. + extern "C" {
  968. + #endif
  969.   /* Parameters to gdbm_open for READERS, WRITERS, and WRITERS who
  970.      can create the database. */
  971.   #define  GDBM_READER  0        /* A reader. */
  972. ***************
  973. *** 91,93 ****
  974. --- 95,101 ----
  975.           GDBM_CANNOT_REPLACE,
  976.           GDBM_ILLEGAL_DATA}
  977.       gdbm_error;
  978. + #ifdef __cplusplus
  979. + }
  980. + #endif
  981. *** 1.11    1992/01/29 21:08:08
  982. --- gemfast.h    1992/06/03 15:26:58
  983. ***************
  984. *** 1,7 ****
  985.   #ifndef _GEMFAST_H
  986.   #define _GEMFAST_H
  987.   
  988. ! #if defined(__cplusplus)
  989.   extern "C" {
  990.   #endif
  991.   
  992. --- 1,7 ----
  993.   #ifndef _GEMFAST_H
  994.   #define _GEMFAST_H
  995.   
  996. ! #ifdef __cplusplus
  997.   extern "C" {
  998.   #endif
  999.   
  1000. ***************
  1001. *** 248,254 ****
  1002.   
  1003.           /* VDI Memory Form Definition Block */
  1004.   
  1005. ! #if !defined(__MFDB__) && !defined(_ALT_MFDB) && !defined(__ALT_MFDB__)
  1006.   #define __MFDB__
  1007.   
  1008.   typedef struct
  1009. --- 248,257 ----
  1010.   
  1011.           /* VDI Memory Form Definition Block */
  1012.   
  1013. ! #ifndef __MFDB__
  1014. ! #ifndef _ALT_MFDB
  1015. ! #ifndef __ALT_MFDB__
  1016.   #define __MFDB__
  1017.   
  1018.   typedef struct
  1019. ***************
  1020. *** 265,270 ****
  1021. --- 268,275 ----
  1022.       short        fd_r2;      /* Reserved                             */
  1023.       short        fd_r3;      /* Reserved                             */
  1024.   } MFDB;
  1025. + #endif
  1026. + #endif
  1027.   #endif    /* __MFDB__ */
  1028.   
  1029.   #ifdef __ALT_MFDB__
  1030. ***************
  1031. *** 491,497 ****
  1032.   extern void          *_addrin[], *_addrout[];
  1033.   extern int        gl_apid, gl_ap_version;
  1034.   
  1035. ! #if defined(__cplusplus)
  1036.   }
  1037.   #endif
  1038.   
  1039. --- 496,502 ----
  1040.   extern void          *_addrin[], *_addrout[];
  1041.   extern int        gl_apid, gl_ap_version;
  1042.   
  1043. ! #ifdef __cplusplus
  1044.   }
  1045.   #endif
  1046.   
  1047. *** 1.4    1991/06/20 02:21:30
  1048. --- gnu-ar.h    1992/06/03 15:26:58
  1049. ***************
  1050. *** 1,7 ****
  1051.   #ifndef _GNUAR_H
  1052.   #define _GNUAR_H
  1053.   
  1054. ! #if defined(__cplusplus)
  1055.   extern "C" {
  1056.   #endif
  1057.   
  1058. --- 1,7 ----
  1059.   #ifndef _GNUAR_H
  1060.   #define _GNUAR_H
  1061.   
  1062. ! #ifdef __cplusplus
  1063.   extern "C" {
  1064.   #endif
  1065.   
  1066. ***************
  1067. *** 42,48 ****
  1068.       char ar_fmag[2];    /* does this have to be last? */
  1069.       };
  1070.   
  1071. ! #if defined(__cplusplus)
  1072.   }
  1073.   #endif
  1074.   
  1075. --- 42,48 ----
  1076.       char ar_fmag[2];    /* does this have to be last? */
  1077.       };
  1078.   
  1079. ! #ifdef __cplusplus
  1080.   }
  1081.   #endif
  1082.   
  1083. *** 1.5    1991/06/20 02:21:30
  1084. --- grp.h    1992/06/03 15:26:58
  1085. ***************
  1086. *** 1,15 ****
  1087.   #ifndef _GRP_H
  1088.   #define _GRP_H
  1089.   
  1090. ! #if defined(__cplusplus)
  1091. ! extern "C" {
  1092.   #endif
  1093.   
  1094. ! /*
  1095. !  * We don't do groups at all. This file provides enough fakes to get
  1096. !  * the GNU file utilities compiled; if more are needed (probably)
  1097. !  * add them.
  1098. !  */
  1099.   
  1100.   struct group {
  1101.       char *gr_name;
  1102. --- 1,13 ----
  1103.   #ifndef _GRP_H
  1104.   #define _GRP_H
  1105.   
  1106. ! #ifndef _COMPILER_H
  1107. ! #include <compiler.h>
  1108.   #endif
  1109.   
  1110. ! #ifdef __cplusplus
  1111. ! extern "C" {
  1112. ! #endif
  1113.   
  1114.   struct group {
  1115.       char *gr_name;
  1116. ***************
  1117. *** 18,31 ****
  1118.       char **gr_mem;
  1119.   };
  1120.   
  1121. ! #ifndef _COMPILER_H
  1122. ! #include <compiler.h>
  1123. ! #endif
  1124.   __EXTERN struct group *    getgrgid __PROTO((int gid));
  1125.   __EXTERN struct group * getgrnam __PROTO((char *name));
  1126.   
  1127. ! #if defined(__cplusplus)
  1128.   }
  1129.   #endif
  1130.   
  1131. --- 16,28 ----
  1132.       char **gr_mem;
  1133.   };
  1134.   
  1135. ! __EXTERN void    setgrent __PROTO((void));
  1136. ! __EXTERN void    endgrent __PROTO((void));
  1137. ! __EXTERN struct group *    getgrent __PROTO((void));
  1138.   __EXTERN struct group *    getgrgid __PROTO((int gid));
  1139.   __EXTERN struct group * getgrnam __PROTO((char *name));
  1140.   
  1141. ! #ifdef __cplusplus
  1142.   }
  1143.   #endif
  1144.   
  1145. *** 1.15    1992/03/22 22:05:23
  1146. --- ioctl.h    1992/06/03 15:26:58
  1147. ***************
  1148. *** 1,7 ****
  1149.   #ifndef    _IOCTL_H
  1150. ! # define _IOCTL_H
  1151.   
  1152. ! #if defined(__cplusplus)
  1153.   extern "C" {
  1154.   #endif
  1155.   
  1156. --- 1,11 ----
  1157.   #ifndef    _IOCTL_H
  1158. ! #define _IOCTL_H
  1159.   
  1160. ! #ifndef _COMPILER_H
  1161. ! #include <compiler.h>
  1162. ! #endif
  1163. ! #ifdef __cplusplus
  1164.   extern "C" {
  1165.   #endif
  1166.   
  1167. ***************
  1168. *** 34,40 ****
  1169.   #define TIOCLSET    (('T'<<8) | 19)
  1170.   
  1171.   #define NTTYDISC    1
  1172. !   
  1173.   /* ioctl's to act on processes */
  1174.   #define PPROCADDR    (('P'<<8) | 1)
  1175.   #define PBASEADDR    (('P'<<8) | 2)
  1176. --- 38,44 ----
  1177.   #define TIOCLSET    (('T'<<8) | 19)
  1178.   
  1179.   #define NTTYDISC    1
  1180.   /* ioctl's to act on processes */
  1181.   #define PPROCADDR    (('P'<<8) | 1)
  1182.   #define PBASEADDR    (('P'<<8) | 2)
  1183. ***************
  1184. *** 64,85 ****
  1185.   #define    ECHO        0x0004
  1186.   #define    XTABS        0x0008
  1187.   #define    RAW        0x0010
  1188. ! #define    LCASE        0x0020        /* does nothing (and never will!) */
  1189. ! #define    TANDEM        0x0000        /* not needed */
  1190. ! #define META        0x0100        /* extension: Alternate as meta key */
  1191. ! #define PASS8        0x0100
  1192.   #define EVENP        0x4000
  1193.   #define ODDP        0x8000
  1194.   
  1195. - #ifdef __MINT__
  1196. - #define TOSTOP        0x0100
  1197. - #define XKEY        0x0200
  1198. - struct xkey {
  1199. -     short    xk_num;
  1200. -     char    xk_def[8];
  1201. - };
  1202. - #endif
  1203.   /* Only ones that are likely to be used are here */
  1204.   /* ok, but emacs thinks it knows their value */
  1205.   #define B50        1
  1206. --- 68,78 ----
  1207.   #define    ECHO        0x0004
  1208.   #define    XTABS        0x0008
  1209.   #define    RAW        0x0010
  1210. ! #define LCASE        0x0020        /* does nothing */
  1211. ! #define TANDEM        0x1000
  1212.   #define EVENP        0x4000
  1213.   #define ODDP        0x8000
  1214.   
  1215.   /* Only ones that are likely to be used are here */
  1216.   /* ok, but emacs thinks it knows their value */
  1217.   #define B50        1
  1218. ***************
  1219. *** 99,106 ****
  1220. --- 92,127 ----
  1221.   #define B38400        15
  1222.   
  1223.   #define ANYP        (B300|B1200|B2400|B4800|B9600)
  1224. + /* The ones below aren't supported by the kernel, at least not yet */
  1225. + #define VTDELAY        0
  1226.   #define ALLDELAY    0
  1227.   
  1228. + #ifdef __MINT__
  1229. + #define TOSTOP        0x0100
  1230. + #define XKEY        0x0200
  1231. + struct xkey {
  1232. +     short    xk_num;
  1233. +     char    xk_def[8];
  1234. + };
  1235. + /* some fake defines for the line discipline stuff */
  1236. + #define LCRTBS        0x01
  1237. + #define LCRTERA        0x02
  1238. + #define LCRTKIL        0x04
  1239. + #define LPRTERA        0x10
  1240. + #define LFLUSHO        0x20
  1241. + #define LLITOUT        0x100
  1242. + #else
  1243. + #define META        0x0100        /* extension: Alternate as meta key */
  1244. + #define PASS8        0x0100
  1245. + #endif /* __MINT__ */
  1246.   struct sgttyb {
  1247.       char    sg_ispeed;
  1248.       char    sg_ospeed;
  1249. ***************
  1250. *** 116,130 ****
  1251.       short    ws_ypixel;
  1252.   };
  1253.   
  1254. ! #ifndef _COMPILER_H
  1255. ! #include <compiler.h>
  1256. ! #endif
  1257. ! __EXTERN int ioctl __PROTO((int fd, int func, void *arg));
  1258. ! __EXTERN int stty  __PROTO((int fd, struct sgttyb *tty));
  1259. ! __EXTERN int gtty  __PROTO((int fd, struct sgttyb *tty));
  1260.   
  1261. ! #if defined(__cplusplus)
  1262.   }
  1263.   #endif
  1264.   
  1265. --- 137,147 ----
  1266.       short    ws_ypixel;
  1267.   };
  1268.   
  1269. ! __EXTERN int ioctl    __PROTO((int, int, void *));
  1270. ! __EXTERN int stty    __PROTO((int, struct sgttyb *));
  1271. ! __EXTERN int gtty    __PROTO((int, struct sgttyb *));
  1272.   
  1273. ! #ifdef __cplusplus
  1274.   }
  1275.   #endif
  1276.   
  1277. *** 1.8    1991/06/20 02:21:30
  1278. --- keycodes.h    1992/06/03 15:26:59
  1279. ***************
  1280. *** 3,9 ****
  1281.   #ifndef _KEYCODES_H
  1282.   #define _KEYCODES_H
  1283.   
  1284. ! #if defined(__cplusplus)
  1285.   extern "C" {
  1286.   #endif
  1287.   
  1288. --- 3,9 ----
  1289.   #ifndef _KEYCODES_H
  1290.   #define _KEYCODES_H
  1291.   
  1292. ! #ifdef __cplusplus
  1293.   extern "C" {
  1294.   #endif
  1295.   
  1296. *** 1.7    1991/05/23 15:15:09
  1297. --- limits.h    1992/06/03 15:26:59
  1298. ***************
  1299. *** 6,76 ****
  1300.   #ifndef    _LIMITS_H
  1301.   #define    _LIMITS_H
  1302.   
  1303. ! #define    PATHSIZE    (128)        /* maximum pathname length */
  1304.   
  1305.   #define    BITSPERBYTE    8
  1306.   
  1307. - /* limits.h */
  1308. - /* Produced by config version 4.2, CWI, Amsterdam */
  1309.   
  1310. -    /* Number of bits in a storage unit */
  1311.   #define CHAR_BIT 8
  1312.   
  1313. - #ifdef __CHAR_UNSIGNED__    /* char is unsigned */
  1314. -    /* Maximum char */
  1315. - #define CHAR_MAX 255
  1316. -    /* Minimum char */
  1317. - #define CHAR_MIN 0
  1318. - #else                /* char is signed */
  1319. -    /* Maximum char */
  1320. - #define CHAR_MAX 127
  1321. -    /* Minimum char */
  1322. - #define CHAR_MIN (-128)
  1323. - #endif /* __CHAR_UNSIGNED__ */
  1324. -    /* Maximum signed char */
  1325.   #define SCHAR_MAX 127
  1326. -    /* Minimum signed char */
  1327.   #define SCHAR_MIN (-128)
  1328. -    /* Maximum unsigned char (minimum is always 0) */
  1329.   #define UCHAR_MAX 255
  1330. !    /* Maximum short */
  1331.   #define SHRT_MAX 32767
  1332. -    /* Minimum short */
  1333.   #define SHRT_MIN (-32768)
  1334. -    /* Maximum long */
  1335.   #define LONG_MAX 2147483647L
  1336. -    /* Minimum long */
  1337.   #define LONG_MIN (-2147483648L)
  1338. -    /* Maximum unsigned short (minimum is always 0) */
  1339.   #define USHRT_MAX 65535U
  1340. -    /* Maximum unsigned long (minimum is always 0) */
  1341.   #define ULONG_MAX 4294967295UL
  1342.   
  1343.   #ifdef __MSHORT__ /* 16 bit ints */
  1344. -    /* Maximum int */
  1345.   #define INT_MAX SHRT_MAX
  1346. -    /* Minimum int */
  1347.   #define INT_MIN SHRT_MIN
  1348. -    /* Maximum unsigned int (minimum is always 0) */
  1349.   #define UINT_MAX USHRT_MAX
  1350.   
  1351.   #else /* 32 bit ints */
  1352.   
  1353. -    /* Maximum int */
  1354.   #define INT_MAX 2147483647
  1355. -    /* Minimum int */
  1356.   #define INT_MIN (-2147483648)
  1357. -    /* Maximum unsigned int (minimum is always 0) */
  1358.   #define UINT_MAX 4294967295U
  1359.   
  1360.   #endif /* __MSHORT__ */
  1361.   
  1362. ! #define MB_LEN_MAX    1   /* max. number of bytes in a multibyte character */
  1363.   
  1364.   /*
  1365.    * POSIX-specific stuff; see 1003.1 sect. 2.9
  1366. --- 6,56 ----
  1367.   #ifndef    _LIMITS_H
  1368.   #define    _LIMITS_H
  1369.   
  1370. ! #ifndef _COMPILER_H
  1371. ! #include <compiler.h>
  1372. ! #endif
  1373.   
  1374. + #ifndef __MINT__
  1375. + #define    PATHSIZE    (128)        /* maximum pathname length */
  1376.   #define    BITSPERBYTE    8
  1377. + #endif
  1378.   
  1379.   
  1380.   #define CHAR_BIT 8
  1381.   
  1382.   #define SCHAR_MAX 127
  1383.   #define SCHAR_MIN (-128)
  1384.   #define UCHAR_MAX 255
  1385. ! #ifdef __CHAR_UNSIGNED__
  1386. ! #define CHAR_MAX UCHAR_MAX
  1387. ! #define CHAR_MIN 0
  1388. ! #else
  1389. ! #define CHAR_MAX SCHAR_MAX
  1390. ! #define CHAR_MIN SCHAR_MIN
  1391. ! #endif
  1392.   #define SHRT_MAX 32767
  1393.   #define SHRT_MIN (-32768)
  1394.   #define LONG_MAX 2147483647L
  1395.   #define LONG_MIN (-2147483648L)
  1396.   #define USHRT_MAX 65535U
  1397.   #define ULONG_MAX 4294967295UL
  1398.   
  1399.   #ifdef __MSHORT__ /* 16 bit ints */
  1400.   #define INT_MAX SHRT_MAX
  1401.   #define INT_MIN SHRT_MIN
  1402.   #define UINT_MAX USHRT_MAX
  1403.   
  1404.   #else /* 32 bit ints */
  1405.   
  1406.   #define INT_MAX 2147483647
  1407.   #define INT_MIN (-2147483648)
  1408.   #define UINT_MAX 4294967295U
  1409.   
  1410.   #endif /* __MSHORT__ */
  1411.   
  1412. ! #define MB_LEN_MAX    1    /* max. number of bytes in a multibyte character */
  1413.   
  1414.   /*
  1415.    * POSIX-specific stuff; see 1003.1 sect. 2.9
  1416. ***************
  1417. *** 81,87 ****
  1418.   
  1419.   #define _POSIX_ARG_MAX        4096
  1420.   #define _POSIX_CHILD_MAX    6
  1421. ! #define _POSIX_LINK_MAX        1    /* <- NON-CONFORMING */
  1422.   #define _POSIX_MAX_CANON    64    /* <- NON-CONFORMING */
  1423.   #define _POSIX_MAX_INPUT    64    /* <- NON-CONFORMING */
  1424.   #define _POSIX_NAME_MAX        14
  1425. --- 61,67 ----
  1426.   
  1427.   #define _POSIX_ARG_MAX        4096
  1428.   #define _POSIX_CHILD_MAX    6
  1429. ! #define _POSIX_LINK_MAX        8
  1430.   #define _POSIX_MAX_CANON    64    /* <- NON-CONFORMING */
  1431.   #define _POSIX_MAX_INPUT    64    /* <- NON-CONFORMING */
  1432.   #define _POSIX_NAME_MAX        14
  1433. ***************
  1434. *** 88,94 ****
  1435.   #define _POSIX_NGROUPS_MAX    0
  1436.   #define _POSIX_OPEN_MAX        16
  1437.   #define _POSIX_PATH_MAX        128    /* <- NON-CONFORMING */
  1438. ! #define _POSIX_PIPE_BUF        1    /* <- NON-CONFORMING */
  1439.   
  1440.   #ifndef __STRICT_ANSI__
  1441.   
  1442. --- 68,74 ----
  1443.   #define _POSIX_NGROUPS_MAX    0
  1444.   #define _POSIX_OPEN_MAX        16
  1445.   #define _POSIX_PATH_MAX        128    /* <- NON-CONFORMING */
  1446. ! #define _POSIX_PIPE_BUF        512
  1447.   
  1448.   #ifndef __STRICT_ANSI__
  1449.   
  1450. ***************
  1451. *** 100,109 ****
  1452.   #endif
  1453.   
  1454.   #define OPEN_MAX        20
  1455. ! #define LINK_MAX        _POSIX_LINK_MAX
  1456.   #define MAX_CANON        _POSIX_MAX_CANON
  1457.   #define MAX_INPUT        _POSIX_MAX_INPUT
  1458. ! #define NAME_MAX        _POSIX_NAME_MAX
  1459.   
  1460.   /* _LIB_NAME_MAX longest name supported in the library
  1461.    *  before you change this, please look at stat.c, symdir.c, dirent.[ch],
  1462. --- 80,95 ----
  1463.   #endif
  1464.   
  1465.   #define OPEN_MAX        20
  1466. ! #ifdef __MINT__
  1467. ! # define LINK_MAX        32767
  1468. ! #else
  1469. ! # define LINK_MAX        1
  1470. ! #endif
  1471.   #define MAX_CANON        _POSIX_MAX_CANON
  1472.   #define MAX_INPUT        _POSIX_MAX_INPUT
  1473. ! #define NAME_MAX        31
  1474. !         /* actually, MiNT file systems _could_ support more */
  1475.   
  1476.   /* _LIB_NAME_MAX longest name supported in the library
  1477.    *  before you change this, please look at stat.c, symdir.c, dirent.[ch],
  1478. *** 1.10    1991/09/24 17:05:40
  1479. --- linea.h    1992/06/03 15:26:59
  1480. ***************
  1481. *** 11,17 ****
  1482.   #include <compiler.h>
  1483.   #endif
  1484.   
  1485. ! #if defined(__cplusplus)
  1486.   extern "C" {
  1487.   #endif
  1488.   
  1489. --- 11,17 ----
  1490.   #include <compiler.h>
  1491.   #endif
  1492.   
  1493. ! #ifdef __cplusplus
  1494.   extern "C" {
  1495.   #endif
  1496.   
  1497. ***************
  1498. *** 760,766 ****
  1499.   
  1500.       /* Functions */
  1501.   
  1502. ! #ifndef __NO_INLINE__
  1503.   
  1504.   #define linea0()                             \
  1505.   ({                                    \
  1506. --- 760,766 ----
  1507.   
  1508.       /* Functions */
  1509.   
  1510. ! #ifdef __GNUC_INLINE__
  1511.   
  1512.   #define linea0()                             \
  1513.   ({                                    \
  1514. ***************
  1515. *** 987,995 ****
  1516.   __EXTERN void lineae __PROTO((void));
  1517.   __EXTERN void lineaf __PROTO((void));
  1518.   
  1519. ! #endif /* __NO_INLINE__ */
  1520.   
  1521. ! #if defined(__cplusplus)
  1522.   }
  1523.   #endif
  1524.   
  1525. --- 987,995 ----
  1526.   __EXTERN void lineae __PROTO((void));
  1527.   __EXTERN void lineaf __PROTO((void));
  1528.   
  1529. ! #endif /* __GNUC_INLINE__ */
  1530.   
  1531. ! #ifdef __cplusplus
  1532.   }
  1533.   #endif
  1534.   
  1535. *** 1.6    1991/06/20 02:21:30
  1536. --- locale.h    1992/06/03 15:26:59
  1537. ***************
  1538. *** 10,16 ****
  1539.   #include <compiler.h>
  1540.   #endif
  1541.   
  1542. ! #if defined(__cplusplus)
  1543.   extern "C" {
  1544.   #endif
  1545.   
  1546. --- 10,16 ----
  1547.   #include <compiler.h>
  1548.   #endif
  1549.   
  1550. ! #ifdef __cplusplus
  1551.   extern "C" {
  1552.   #endif
  1553.   
  1554. ***************
  1555. *** 47,53 ****
  1556.   
  1557.   __EXTERN struct lconv *    localeconv __PROTO((void));
  1558.   
  1559. ! #if defined(__cplusplus)
  1560.   }
  1561.   #endif
  1562.   
  1563. --- 47,53 ----
  1564.   
  1565.   __EXTERN struct lconv *    localeconv __PROTO((void));
  1566.   
  1567. ! #ifdef __cplusplus
  1568.   }
  1569.   #endif
  1570.   
  1571. *** 1.3    1992/02/04 18:47:36
  1572. --- math-68881.h    1992/06/03 15:27:00
  1573. ***************
  1574. *** 152,158 ****
  1575.           {
  1576.             double value;
  1577.   
  1578. !           __asm ("fmove%.d %#0rnan,%0"     /* quiet NaN */
  1579.                : "=f" (value)
  1580.                : /* no inputs */);
  1581.             return value;
  1582. --- 152,158 ----
  1583.           {
  1584.             double value;
  1585.   
  1586. !           __asm ("fmove%.d %#0x7fffffffffffffff,%0"     /* quiet NaN */
  1587.                : "=f" (value)
  1588.                : /* no inputs */);
  1589.             return value;
  1590. ***************
  1591. *** 279,285 ****
  1592.       {
  1593.         double value;
  1594.   
  1595. !       __asm ("fmove%.d %#0rnan,%0"        /* quiet NaN */
  1596.            : "=f" (value)
  1597.            : /* no inputs */);
  1598.         return value;
  1599. --- 279,285 ----
  1600.       {
  1601.         double value;
  1602.   
  1603. !           __asm ("fmove%.d %#0x7fffffffffffffff,%0"     /* quiet NaN */
  1604.            : "=f" (value)
  1605.            : /* no inputs */);
  1606.         return value;
  1607. ***************
  1608. *** 305,311 ****
  1609.           {
  1610.         double value;
  1611.   
  1612. !       __asm ("fmove%.d %#0rnan,%0"        /* quiet NaN */
  1613.            : "=f" (value)
  1614.            : /* no inputs */);
  1615.         return value;
  1616. --- 305,311 ----
  1617.           {
  1618.         double value;
  1619.   
  1620. !           __asm ("fmove%.d %#0x7fffffffffffffff,%0"     /* quiet NaN */
  1621.            : "=f" (value)
  1622.            : /* no inputs */);
  1623.         return value;
  1624. *** 1.13    1992/03/22 22:05:23
  1625. --- math.h    1992/06/03 15:27:00
  1626. ***************
  1627. *** 38,44 ****
  1628.    */
  1629.   
  1630.   
  1631. ! #if defined(__cplusplus)
  1632.   extern "C" {
  1633.   #endif
  1634.   
  1635. --- 38,48 ----
  1636.    */
  1637.   
  1638.   
  1639. ! #ifndef _COMPILER_H
  1640. ! #include <compiler.h>
  1641. ! #endif
  1642. ! #ifdef __cplusplus
  1643.   extern "C" {
  1644.   #endif
  1645.   
  1646. ***************
  1647. *** 83,97 ****
  1648.   #include <math-68881.h>
  1649.   #endif
  1650.   
  1651. ! #if defined(__GNUC__) && (!defined(__cplusplus))
  1652. ! #ifndef max
  1653. ! #define max(x,y) ({typeof(x) _x=(x); typeof(y) _y=(y); if (_x>_y) _y=_x; _y;})
  1654. ! #define min(x,y) ({typeof(x) _x=(x); typeof(y) _y=(y); if (_x<_y) _y=_x; _y;})
  1655. ! #endif
  1656. ! #endif
  1657. ! #ifndef _COMPILER_H
  1658. ! #include <compiler.h>
  1659.   #endif
  1660.   
  1661.   #ifndef _M68881
  1662. --- 87,99 ----
  1663.   #include <math-68881.h>
  1664.   #endif
  1665.   
  1666. ! #ifdef __GNUC__
  1667. ! # ifndef __cplusplus
  1668. ! #  ifndef max
  1669. ! #   define max(x,y) ({typeof(x) _x=(x); typeof(y) _y=(y); if (_x>_y) _y=_x; _y;})
  1670. ! #   define min(x,y) ({typeof(x) _x=(x); typeof(y) _y=(y); if (_x<_y) _y=_x; _y;})
  1671. ! #  endif
  1672. ! # endif
  1673.   #endif
  1674.   
  1675.   #ifndef _M68881
  1676. ***************
  1677. *** 168,174 ****
  1678.   __EXTERN double frexp    __PROTO((double, int *));
  1679.   #endif /* !_M68881 */
  1680.   
  1681. ! #if defined(__cplusplus)
  1682.   }
  1683.   #endif
  1684.   
  1685. --- 170,176 ----
  1686.   __EXTERN double frexp    __PROTO((double, int *));
  1687.   #endif /* !_M68881 */
  1688.   
  1689. ! #ifdef __cplusplus
  1690.   }
  1691.   #endif
  1692.   
  1693. *** 1.15    1992/03/22 22:05:23
  1694. --- memory.h    1992/06/03 15:27:00
  1695. ***************
  1696. *** 5,11 ****
  1697.   #include <compiler.h>
  1698.   #endif
  1699.   
  1700. ! #if defined(__cplusplus)
  1701.   extern "C" {
  1702.   #endif
  1703.   
  1704. --- 5,11 ----
  1705.   #include <compiler.h>
  1706.   #endif
  1707.   
  1708. ! #ifdef __cplusplus
  1709.   extern "C" {
  1710.   #endif
  1711.   
  1712. ***************
  1713. *** 14,22 ****
  1714.   typedef _SIZE_T size_t;
  1715.   #endif
  1716.   
  1717. ! #if defined(__GNUC__) || defined(__GNUG__)
  1718.   #  ifndef alloca
  1719. ! #    define alloca(x)  __builtin_alloca(x)
  1720.   #  endif
  1721.   #endif
  1722.   
  1723. --- 14,22 ----
  1724.   typedef _SIZE_T size_t;
  1725.   #endif
  1726.   
  1727. ! #ifdef __GNUC__
  1728.   #  ifndef alloca
  1729. ! #    define alloca(X) __builtin_alloca(X)
  1730.   #  endif
  1731.   #endif
  1732.   
  1733. ***************
  1734. *** 26,44 ****
  1735.   __EXTERN void *calloc __PROTO((size_t n, size_t sz));
  1736.   __EXTERN void _malloczero __PROTO((int yes));
  1737.   __EXTERN void _mallocChunkSize __PROTO((size_t siz));
  1738.   #ifndef alloca
  1739.   #  ifndef __cplusplus
  1740.       __EXTERN void *alloca __PROTO((size_t));
  1741.   #  else
  1742. !     __EXTERN void *alloca __PROTO((long unsigned int));
  1743.   #  endif
  1744.   #endif
  1745. - __EXTERN void *mlalloc __PROTO((long));
  1746. - __EXTERN void *relalloc __PROTO((void *, long));
  1747. - __EXTERN void *clalloc __PROTO((long, long));
  1748.   
  1749. ! #if defined(__cplusplus)
  1750. ! }
  1751.   #endif
  1752.   
  1753.   #endif /* _MEMORY_H */
  1754. --- 26,56 ----
  1755.   __EXTERN void *calloc __PROTO((size_t n, size_t sz));
  1756.   __EXTERN void _malloczero __PROTO((int yes));
  1757.   __EXTERN void _mallocChunkSize __PROTO((size_t siz));
  1758. + __EXTERN void *_malloc __PROTO((unsigned long n));
  1759. + __EXTERN void *_realloc __PROTO((void *_r, unsigned long n));
  1760. + __EXTERN void *_calloc __PROTO((unsigned long n, unsigned long sz));
  1761. + __EXTERN void *sbrk __PROTO((size_t));
  1762. + __EXTERN void *lsbrk __PROTO((long));
  1763. + __EXTERN void *_sbrk __PROTO((long));
  1764.   #ifndef alloca
  1765.   #  ifndef __cplusplus
  1766.       __EXTERN void *alloca __PROTO((size_t));
  1767.   #  else
  1768. !      __EXTERN void *alloca __PROTO((long unsigned int));
  1769.   #  endif
  1770.   #endif
  1771.   
  1772. ! #ifdef __SOZOBON__
  1773. ! __EXTERN void *lmalloc __PROTO((long));
  1774. ! __EXTERN void *lrealloc __PROTO((void *, long));
  1775. ! __EXTERN void *lcalloc __PROTO((long, long));
  1776.   #endif
  1777.   
  1778. + #ifdef __cplusplus
  1779. + }
  1780. + #endif
  1781. +   
  1782.   #endif /* _MEMORY_H */
  1783. *** 1.11    1992/03/22 22:05:23
  1784. --- minimal.h    1992/06/03 15:27:01
  1785. ***************
  1786. *** 6,12 ****
  1787.   #include <osbind.h>
  1788.   #endif
  1789.   
  1790. ! #if defined(__cplusplus)
  1791.   extern "C" {
  1792.   #endif
  1793.   
  1794. --- 6,12 ----
  1795.   #include <osbind.h>
  1796.   #endif
  1797.   
  1798. ! #ifdef __cplusplus
  1799.   extern "C" {
  1800.   #endif
  1801.   
  1802. ***************
  1803. *** 15,33 ****
  1804.   int _console_dev = 2;
  1805.   #endif
  1806.   
  1807.   
  1808.   __EXTERN __EXITING __exit __PROTO((long)); /* def in crt0.c */
  1809. - void     _init_signal __PROTO((void));
  1810.   int       raise    __PROTO((int sig));
  1811. - void      exit  __PROTO((int status));
  1812.   void     _exit  __PROTO((int status));
  1813. - void     _main  __PROTO((long argc, char **argv, char **environ));
  1814.   
  1815. ! void
  1816. ! _init_signal()
  1817.   {
  1818. !  /* NULL */
  1819.   }
  1820.   
  1821.   int
  1822. --- 15,30 ----
  1823.   int _console_dev = 2;
  1824.   #endif
  1825.   
  1826. + #ifndef __MINT__
  1827.   
  1828.   __EXTERN __EXITING __exit __PROTO((long)); /* def in crt0.c */
  1829.   int       raise    __PROTO((int sig));
  1830.   void     _exit  __PROTO((int status));
  1831.   
  1832. ! void _exit(status)
  1833. !     int status;
  1834.   {
  1835. !     __exit((long)status);
  1836.   }
  1837.   
  1838.   int
  1839. ***************
  1840. *** 37,66 ****
  1841.       return 0;
  1842.   }
  1843.   
  1844.   void
  1845. ! exit(status)
  1846. !     int status;
  1847.   {
  1848. -     __exit((long)status);
  1849.   }
  1850.   
  1851. ! void _exit(status)
  1852.       int status;
  1853.   {
  1854. !     __exit((long)status);
  1855.   }
  1856.   
  1857. - /* extern int main(); causes unnecessary pain with protos */
  1858.   void _main(argc, argv, environ)
  1859.       long argc;
  1860.       char **argv;
  1861.       char **environ;
  1862.   {
  1863. !     __exit((long)(main((int)argc, argv, environ)));
  1864.   }
  1865.   
  1866. ! #if defined(__cplusplus)
  1867.   }
  1868.   #endif
  1869. --- 34,72 ----
  1870.       return 0;
  1871.   }
  1872.   
  1873. + #else
  1874. + __EXTERN __EXITING _exit __PROTO((int));
  1875. + #define __exit _exit
  1876. + #endif /* __MINT__ */
  1877. + void     _init_signal __PROTO((void));
  1878. + void      exit  __PROTO((int status));
  1879. + void     _main  __PROTO((long argc, char **argv, char **environ));
  1880.   void
  1881. ! _init_signal()
  1882.   {
  1883.   }
  1884.   
  1885. ! __EXITING
  1886. ! exit(status)
  1887.       int status;
  1888.   {
  1889. !     __exit(status);
  1890.   }
  1891.   
  1892.   void _main(argc, argv, environ)
  1893.       long argc;
  1894.       char **argv;
  1895.       char **environ;
  1896.   {
  1897. !     __EXTERN int main __PROTO((int, char **, char **));
  1898. !     exit(main((int)argc, argv, environ));
  1899.   }
  1900.   
  1901. ! #ifdef __cplusplus
  1902.   }
  1903.   #endif
  1904. *** 1.7    1992/03/10 15:22:18
  1905. --- mintbind.h    1992/06/03 15:27:01
  1906. ***************
  1907. *** 1,19 ****
  1908.   #ifndef _MINTBIND_H
  1909.   #define _MINTBIND_H
  1910.   
  1911. ! #ifdef __MINT__
  1912. ! #if defined(__cplusplus)
  1913. ! extern "C" {
  1914.   #endif
  1915.   
  1916. ! #ifndef _OSBIND_H
  1917. ! #include <osbind.h>
  1918.   #endif
  1919.   
  1920. ! #if defined(__GNUC__) && !defined(__NO_INLINE__)
  1921.   #define trap_1_wwlw(n, a, b, c)                        \
  1922.   ({                                    \
  1923.       register long retvalue __asm__("d0");                \
  1924. --- 1,21 ----
  1925.   #ifndef _MINTBIND_H
  1926.   #define _MINTBIND_H
  1927.   
  1928. ! #ifdef __TURBOC__
  1929. ! # ifndef __TOS
  1930. ! #  include <tos.h>
  1931. ! # endif
  1932. ! #else
  1933. ! # ifndef _OSBIND_H
  1934. ! #  include <osbind.h>
  1935. ! # endif
  1936.   #endif
  1937.   
  1938. ! #ifdef __cplusplus
  1939. ! extern "C" {
  1940.   #endif
  1941.   
  1942. ! #ifdef __GNUC_INLINE__
  1943.   #define trap_1_wwlw(n, a, b, c)                        \
  1944.   ({                                    \
  1945.       register long retvalue __asm__("d0");                \
  1946. ***************
  1947. *** 79,103 ****
  1948.   })
  1949.   
  1950.   #else
  1951. ! # ifdef __MSHORT__
  1952. ! #  ifndef trap_1_w
  1953. ! #   define trap_1_w(n)        gemdos(n)
  1954. ! #   define trap_1_wl(n,a)    gemdos(n, (long)(a))
  1955. ! #   define trap_1_ww(n,a)    gemdos(n, a)
  1956. ! #   define trap_1_www(n,a,b)    gemdos(n, a, b)
  1957. ! #   define trap_1_wlww(n,a,b,c)    gemdos(n, a, b, c)
  1958. ! #   define trap_13_w(n)        bios(n)
  1959. ! #   define trap_14_w(n)        xbios(n)
  1960. ! #  endif
  1961. ! #  define trap_1_wwlw(n,a,b,c)    gemdos(n, a, (long)b, c)
  1962. ! #  define trap_1_wwl(n, a, b)    gemdos(n, a, (long)b)
  1963.   # endif
  1964.   #endif
  1965.   
  1966.   #define    Syield()                        \
  1967. !         trap_1_w(0xff)
  1968.   #define Fpipe(ptr)                        \
  1969. !         trap_1_wl(0x100, (long)(ptr))
  1970.   #define Fcntl(f, arg, cmd)                    \
  1971.           trap_1_wwlw(0x104, (short)(f), (long)(arg), (short)(cmd))
  1972.   #define Finstat(f)                        \
  1973. --- 81,118 ----
  1974.   })
  1975.   
  1976.   #else
  1977. ! #ifdef __GNUC__
  1978. ! # ifndef __MSHORT__
  1979. ! #  define __LONG_TRAPS__
  1980.   # endif
  1981.   #endif
  1982.   
  1983. + #ifndef __LONG_TRAPS__
  1984. + # ifndef trap_1_w
  1985. + #  define trap_1_w(n)        gemdos(n)
  1986. + #  define trap_1_wl(n,a)        gemdos(n, (long)(a))
  1987. + #  define trap_1_wll(n, a, b)    gemdos(n, (long)(a), (long)(b))
  1988. + #  define trap_1_ww(n,a)        gemdos(n, a)
  1989. + #  define trap_1_www(n,a,b)    gemdos(n, a, b)
  1990. + #  define trap_1_wwlll(n,a,b,c,d) gemdos(n, a, (long)(b), (long)(c), (long)(d))
  1991. + #  define trap_1_wwll(n, a, b, c)    gemdos(n, a, (long)(b), (long)(c))
  1992. + #  define trap_1_wlw(n, a, b)    gemdos(n, (long)(a), b)
  1993. + #  define trap_1_wlww(n, a, b, c)    gemdos(n, (long)(a), b, c)
  1994. + #  define trap_13_w(n)        bios(n)
  1995. + #  define trap_14_w(n)        xbios(n)
  1996. + # endif
  1997. + # define trap_1_wwlw(n,a,b,c)    gemdos(n, a, (long)(b), c)
  1998. + # define trap_1_wwww(n,a,b,c)    gemdos(n, a, b, c)
  1999. + # define trap_1_wwl(n, a, b)    gemdos(n, a, (long)(b))
  2000. + #endif /* __LONG_TRAPS__ */
  2001. + #endif /* __GNUC_INLINE__ */
  2002.   #define    Syield()                        \
  2003. !         (int)trap_1_w(0xff)
  2004.   #define Fpipe(ptr)                        \
  2005. !         (int)trap_1_wl(0x100, (long)(ptr))
  2006.   #define Fcntl(f, arg, cmd)                    \
  2007.           trap_1_wwlw(0x104, (short)(f), (long)(arg), (short)(cmd))
  2008.   #define Finstat(f)                        \
  2009. ***************
  2010. *** 112,140 ****
  2011.   #define Pwait()                            \
  2012.           trap_1_w(0x109)
  2013.   #define Pnice(delta)                        \
  2014. !         trap_1_ww(0x10a, (short)(delta))
  2015.   #define Pgetpid()                        \
  2016. !         trap_1_w(0x10b)
  2017.   #define Pgetppid()                        \
  2018. !         trap_1_w(0x10c)
  2019.   #define Pgetpgrp()                        \
  2020. !         trap_1_w(0x10d)
  2021.   #define Psetpgrp(pid, grp)                    \
  2022. !         trap_1_www(0x10e, (short)(pid), (short)(grp))
  2023.   #define Pgetuid()                        \
  2024. !         trap_1_w(0x10f)
  2025.   #define Psetuid(id)                        \
  2026. !         trap_1_ww(0x110, (short)(id))
  2027.   #define Pkill(pid, sig)                        \
  2028. !         trap_1_www(0x111, (short)(pid), (short)(sig))
  2029.   #define Psignal(sig, handler)                    \
  2030.           trap_1_wwl(0x112, (short)(sig), (long)(handler))
  2031.   #define Pvfork()                        \
  2032.           trap_1_w(0x113)
  2033.   #define Pgetgid()                        \
  2034. !         trap_1_w(0x114)
  2035.   #define Psetgid(id)                        \
  2036. !         trap_1_ww(0x115, (short)(id))
  2037.   #define Psigblock(mask)                        \
  2038.           trap_1_wl(0x116, (unsigned long)(mask))
  2039.   #define Psigsetmask(mask)                    \
  2040. --- 127,155 ----
  2041.   #define Pwait()                            \
  2042.           trap_1_w(0x109)
  2043.   #define Pnice(delta)                        \
  2044. !         (int)trap_1_ww(0x10a, (short)(delta))
  2045.   #define Pgetpid()                        \
  2046. !         (int)trap_1_w(0x10b)
  2047.   #define Pgetppid()                        \
  2048. !         (int)trap_1_w(0x10c)
  2049.   #define Pgetpgrp()                        \
  2050. !         (int)trap_1_w(0x10d)
  2051.   #define Psetpgrp(pid, grp)                    \
  2052. !         (int)trap_1_www(0x10e, (short)(pid), (short)(grp))
  2053.   #define Pgetuid()                        \
  2054. !         (int)trap_1_w(0x10f)
  2055.   #define Psetuid(id)                        \
  2056. !         (int)trap_1_ww(0x110, (short)(id))
  2057.   #define Pkill(pid, sig)                        \
  2058. !         (int)trap_1_www(0x111, (short)(pid), (short)(sig))
  2059.   #define Psignal(sig, handler)                    \
  2060.           trap_1_wwl(0x112, (short)(sig), (long)(handler))
  2061.   #define Pvfork()                        \
  2062.           trap_1_w(0x113)
  2063.   #define Pgetgid()                        \
  2064. !         (int)trap_1_w(0x114)
  2065.   #define Psetgid(id)                        \
  2066. !         (int)trap_1_ww(0x115, (short)(id))
  2067.   #define Psigblock(mask)                        \
  2068.           trap_1_wl(0x116, (unsigned long)(mask))
  2069.   #define Psigsetmask(mask)                    \
  2070. ***************
  2071. *** 142,159 ****
  2072.   #define Pusrval(arg)                        \
  2073.           trap_1_wl(0x118, (long)(arg))
  2074.   #define Pdomain(arg)                        \
  2075. !         trap_1_ww(0x119, (short)(arg))
  2076.   #define Psigreturn()                        \
  2077. !         trap_1_w(0x11a)
  2078.   #define Pfork()                            \
  2079.           trap_1_w(0x11b)
  2080.   #define Pwait3(flag, rusage)                    \
  2081.           trap_1_wwl(0x11c, (short)(flag), (long)(rusage))
  2082.   #define Fselect(time, rfd, wfd, xfd)                \
  2083. !         trap_1_wwlll(0x11d, (unsigned short)(time), (long)(rfd), \
  2084.                   (long)(wfd), (long)(xfd))
  2085.   #define Prusage(rsp)                        \
  2086. !         trap_1_wl(0x11e, (long)(rsp))
  2087.   #define Psetlimit(i, val)                    \
  2088.           trap_1_wwl(0x11f, (short)(i), (long)(val))
  2089.   
  2090. --- 157,174 ----
  2091.   #define Pusrval(arg)                        \
  2092.           trap_1_wl(0x118, (long)(arg))
  2093.   #define Pdomain(arg)                        \
  2094. !         (int)trap_1_ww(0x119, (short)(arg))
  2095.   #define Psigreturn()                        \
  2096. !         (void)trap_1_w(0x11a)
  2097.   #define Pfork()                            \
  2098.           trap_1_w(0x11b)
  2099.   #define Pwait3(flag, rusage)                    \
  2100.           trap_1_wwl(0x11c, (short)(flag), (long)(rusage))
  2101.   #define Fselect(time, rfd, wfd, xfd)                \
  2102. !         (int)trap_1_wwlll(0x11d, (unsigned short)(time), (long)(rfd), \
  2103.                   (long)(wfd), (long)(xfd))
  2104.   #define Prusage(rsp)                        \
  2105. !         (int)trap_1_wl(0x11e, (long)(rsp))
  2106.   #define Psetlimit(i, val)                    \
  2107.           trap_1_wwl(0x11f, (short)(i), (long)(val))
  2108.   
  2109. ***************
  2110. *** 160,166 ****
  2111.   #define Talarm(sec)                        \
  2112.           trap_1_wl(0x120, (long)(sec))
  2113.   #define Pause()                            \
  2114. !         trap_1_w(0x121);
  2115.   #define Sysconf(n)                        \
  2116.           trap_1_ww(0x122, (short)(n))
  2117.   #define Psigpending()                        \
  2118. --- 175,181 ----
  2119.   #define Talarm(sec)                        \
  2120.           trap_1_wl(0x120, (long)(sec))
  2121.   #define Pause()                            \
  2122. !         (void)trap_1_w(0x121)
  2123.   #define Sysconf(n)                        \
  2124.           trap_1_ww(0x122, (short)(n))
  2125.   #define Psigpending()                        \
  2126. ***************
  2127. *** 173,179 ****
  2128.   #define Fmidipipe(pid, in, out)                    \
  2129.           trap_1_wwww(0x126, (short)(pid), (short)(in),(short)(out))
  2130.   #define Prenice(pid, delta)                    \
  2131. !         trap_1_www(0x127, (short)(pid), (short)(delta))
  2132.   #define Dopendir(name, flag)                    \
  2133.           trap_1_wlw(0x128, (long)(name), (short)(flag))
  2134.   #define Dreaddir(len, handle, buf)                \
  2135. --- 188,194 ----
  2136.   #define Fmidipipe(pid, in, out)                    \
  2137.           trap_1_wwww(0x126, (short)(pid), (short)(in),(short)(out))
  2138.   #define Prenice(pid, delta)                    \
  2139. !         (int)trap_1_www(0x127, (short)(pid), (short)(delta))
  2140.   #define Dopendir(name, flag)                    \
  2141.           trap_1_wlw(0x128, (long)(name), (short)(flag))
  2142.   #define Dreaddir(len, handle, buf)                \
  2143. ***************
  2144. *** 197,218 ****
  2145.   #define Fchmod(name, mode)                    \
  2146.           trap_1_wlw(0x132, (long)(name), (short)(mode))
  2147.   #define Pumask(mask)                        \
  2148. !         trap_1_ww(0x133, (short)(mask))
  2149.   #define Psemaphore(mode, id, tmout)                \
  2150.           trap_1_wwll(0x134, (short)(mode), (long)(id), (long)(tmout))
  2151.   #define Dlock(mode, drive)                    \
  2152. !         trap_1_www(0x135, (short)(mode), (short)(drive))
  2153. ! #define Dos_tab()                        \
  2154. !         trap_1_w(-1)
  2155. ! #define Bios_tab()                        \
  2156. !         trap_13_w(-1)
  2157. ! #define Xbios_tab()                        \
  2158. !         trap_14_w(-1)
  2159.   
  2160. ! #if defined(__cplusplus)
  2161.   }
  2162.   #endif
  2163.   
  2164. - #endif /* __MINT__ */
  2165.   #endif /* _MINTBIND_H */
  2166. --- 212,229 ----
  2167.   #define Fchmod(name, mode)                    \
  2168.           trap_1_wlw(0x132, (long)(name), (short)(mode))
  2169.   #define Pumask(mask)                        \
  2170. !         (int)trap_1_ww(0x133, (short)(mask))
  2171.   #define Psemaphore(mode, id, tmout)                \
  2172.           trap_1_wwll(0x134, (short)(mode), (long)(id), (long)(tmout))
  2173.   #define Dlock(mode, drive)                    \
  2174. !         (int)trap_1_www(0x135, (short)(mode), (short)(drive))
  2175. ! #define Psigpause(mask)                        \
  2176. !         (void)trap_1_wl(0x136, (unsigned long)(mask))
  2177. ! #define Psigaction(sig, act, oact)                    \
  2178. !         trap_1_wwll(0x137, (short)(sig), (long)(act), (long)(oact))
  2179.   
  2180. ! #ifdef __cplusplus
  2181.   }
  2182.   #endif
  2183.   
  2184.   #endif /* _MINTBIND_H */
  2185. *** 1.3    1991/06/20 02:21:30
  2186. --- mouse.h    1992/06/03 15:27:01
  2187. ***************
  2188. *** 1,7 ****
  2189.   #ifndef _MOUSE_H
  2190.   #define _MOUSE_H
  2191.   
  2192. ! #if defined(__cplusplus)
  2193.   extern "C" {
  2194.   #endif
  2195.   
  2196. --- 1,7 ----
  2197.   #ifndef _MOUSE_H
  2198.   #define _MOUSE_H
  2199.   
  2200. ! #ifdef __cplusplus
  2201.   extern "C" {
  2202.   #endif
  2203.   
  2204. ***************
  2205. *** 17,23 ****
  2206.   #define M_RIGHT_BUTTON    0x01
  2207.   #define M_MID_BUTTON    0x00    /* there is none! */
  2208.   
  2209. ! #if defined(__cplusplus)
  2210.   }
  2211.   #endif
  2212.   
  2213. --- 17,23 ----
  2214.   #define M_RIGHT_BUTTON    0x01
  2215.   #define M_MID_BUTTON    0x00    /* there is none! */
  2216.   
  2217. ! #ifdef __cplusplus
  2218.   }
  2219.   #endif
  2220.   
  2221. *** 1.3    1990/03/04 04:17:18
  2222. --- obstack.h    1992/06/03 15:27:02
  2223. ***************
  2224. *** 3,9 ****
  2225.   
  2226.   This program is free software; you can redistribute it and/or modify it
  2227.   under the terms of the GNU General Public License as published by the
  2228. ! Free Software Foundation; either version 1, or (at your option) any
  2229.   later version.
  2230.   
  2231.   This program is distributed in the hope that it will be useful,
  2232. --- 3,9 ----
  2233.   
  2234.   This program is free software; you can redistribute it and/or modify it
  2235.   under the terms of the GNU General Public License as published by the
  2236. ! Free Software Foundation; either version 2, or (at your option) any
  2237.   later version.
  2238.   
  2239.   This program is distributed in the hope that it will be useful,
  2240. ***************
  2241. *** 13,26 ****
  2242.   
  2243.   You should have received a copy of the GNU General Public License
  2244.   along with this program; if not, write to the Free Software
  2245. ! Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  2246.   
  2247. - In other words, you are welcome to use, share and improve this program.
  2248. - You are forbidden to forbid anyone else to use, share and improve
  2249. - what you give them.   Help stamp out software-hoarding!  */
  2250.   /* Summary:
  2251.   
  2252.   All the apparent functions defined here are macros. The idea
  2253. --- 13,20 ----
  2254.   
  2255.   You should have received a copy of the GNU General Public License
  2256.   along with this program; if not, write to the Free Software
  2257. ! Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  2258.   
  2259.   /* Summary:
  2260.   
  2261.   All the apparent functions defined here are macros. The idea
  2262. ***************
  2263. *** 109,114 ****
  2264. --- 103,116 ----
  2265.   #ifndef __OBSTACKS__
  2266.   #define __OBSTACKS__
  2267.   
  2268. + #include <compiler.h>    /* so that the defs here and in obstack.c dont use
  2269. +                the type int so blindly */
  2270. + #ifndef _SIZE_T
  2271. + #define _SIZE_T __SIZE_TYPEDEF__
  2272. + typedef _SIZE_T size_t;
  2273. + #endif
  2274.   /* We use subtraction of (char *)0 instead of casting to int
  2275.      because on word-addressable machines a simple cast to int
  2276.      may ignore the byte-within-word field of the pointer.  */
  2277. ***************
  2278. *** 130,145 ****
  2279.   
  2280.   struct obstack        /* control current object in current chunk */
  2281.   {
  2282. !   long    chunk_size;        /* preferred size to allocate chunks in */
  2283.     struct _obstack_chunk* chunk;    /* address of current struct obstack_chunk */
  2284.     char    *object_base;        /* address of object we are building */
  2285.     char    *next_free;        /* where to add next char to current object */
  2286.     char    *chunk_limit;        /* address of char after current chunk */
  2287. !   int    temp;            /* Temporary for some macros.  */
  2288.     int   alignment_mask;        /* Mask of alignment for each object. */
  2289.     struct _obstack_chunk *(*chunkfun) (); /* User's fcn to allocate a chunk.  */
  2290.     void (*freefun) ();        /* User's function to free a chunk.  */
  2291.   };
  2292.   
  2293.   #ifdef __STDC__
  2294.   
  2295. --- 132,164 ----
  2296.   
  2297.   struct obstack        /* control current object in current chunk */
  2298.   {
  2299. !   size_t chunk_size;        /* preferred size to allocate chunks in */
  2300.     struct _obstack_chunk* chunk;    /* address of current struct obstack_chunk */
  2301.     char    *object_base;        /* address of object we are building */
  2302.     char    *next_free;        /* where to add next char to current object */
  2303.     char    *chunk_limit;        /* address of char after current chunk */
  2304. !   long    temp;            /* Temporary for some macros.  */
  2305.     int   alignment_mask;        /* Mask of alignment for each object. */
  2306.     struct _obstack_chunk *(*chunkfun) (); /* User's fcn to allocate a chunk.  */
  2307.     void (*freefun) ();        /* User's function to free a chunk.  */
  2308. +   /* Nonzero means there is a possibility the current chunk contains
  2309. +      a zero-length object.  This prevents freeing the chunk
  2310. +      if we allocate a bigger chunk to replace it.  */
  2311. +   char  maybe_empty_object;
  2312.   };
  2313. + /* Declare the external functions we use; they are in obstack.c.  */
  2314. + #ifdef __STDC__
  2315. + extern void _obstack_newchunk (struct obstack *, size_t);
  2316. + extern void _obstack_free (struct obstack *, void *);
  2317. + extern void _obstack_begin (struct obstack *, size_t, int,
  2318. +                 void *(*) (), void (*) ());
  2319. + #else
  2320. + extern void _obstack_newchunk ();
  2321. + extern void _obstack_free ();
  2322. + extern void _obstack_begin ();
  2323. + #endif
  2324.   
  2325.   #ifdef __STDC__
  2326.   
  2327. ***************
  2328. *** 148,183 ****
  2329.   
  2330.   void obstack_init (struct obstack *obstack);
  2331.   
  2332. ! void * obstack_alloc (struct obstack *obstack, int size);
  2333.   
  2334. ! void * obstack_copy (struct obstack *obstack, void *address, int size);
  2335. ! void * obstack_copy0 (struct obstack *obstack, void *address, int size);
  2336.   
  2337.   void obstack_free (struct obstack *obstack, void *block);
  2338.   
  2339. ! void obstack_blank (struct obstack *obstack, int size);
  2340.   
  2341. ! void obstack_grow (struct obstack *obstack, void *data, int size);
  2342. ! void obstack_grow0 (struct obstack *obstack, void *data, int size);
  2343.   
  2344.   void obstack_1grow (struct obstack *obstack, int data_char);
  2345.   void obstack_ptr_grow (struct obstack *obstack, void *data);
  2346.   void obstack_int_grow (struct obstack *obstack, int data);
  2347.   
  2348.   void * obstack_finish (struct obstack *obstack);
  2349.   
  2350. ! int obstack_object_size (struct obstack *obstack);
  2351.   
  2352. ! int obstack_room (struct obstack *obstack);
  2353.   void obstack_1grow_fast (struct obstack *obstack, int data_char);
  2354.   void obstack_ptr_grow_fast (struct obstack *obstack, void *data);
  2355.   void obstack_int_grow_fast (struct obstack *obstack, int data);
  2356. ! void obstack_blank_fast (struct obstack *obstack, int size);
  2357.   
  2358.   void * obstack_base (struct obstack *obstack);
  2359.   void * obstack_next_free (struct obstack *obstack);
  2360.   int obstack_alignment_mask (struct obstack *obstack);
  2361. ! int obstack_chunk_size (struct obstack *obstack);
  2362.   
  2363.   #endif /* __STDC__ */
  2364.   
  2365. --- 167,203 ----
  2366.   
  2367.   void obstack_init (struct obstack *obstack);
  2368.   
  2369. ! void * obstack_alloc (struct obstack *obstack, size_t size);
  2370.   
  2371. ! void * obstack_copy (struct obstack *obstack, void *address, size_t size);
  2372. ! void * obstack_copy0 (struct obstack *obstack, void *address, size_t size);
  2373.   
  2374.   void obstack_free (struct obstack *obstack, void *block);
  2375.   
  2376. ! void obstack_blank (struct obstack *obstack, size_t size);
  2377.   
  2378. ! void obstack_grow (struct obstack *obstack, void *data, size_t size);
  2379. ! void obstack_grow0 (struct obstack *obstack, void *data, size_t size);
  2380.   
  2381.   void obstack_1grow (struct obstack *obstack, int data_char);
  2382.   void obstack_ptr_grow (struct obstack *obstack, void *data);
  2383.   void obstack_int_grow (struct obstack *obstack, int data);
  2384. + void obstack_long_grow (struct obstack *obstack, long data);
  2385.   
  2386.   void * obstack_finish (struct obstack *obstack);
  2387.   
  2388. ! size_t obstack_object_size (struct obstack *obstack);
  2389.   
  2390. ! size_t obstack_room (struct obstack *obstack);
  2391.   void obstack_1grow_fast (struct obstack *obstack, int data_char);
  2392.   void obstack_ptr_grow_fast (struct obstack *obstack, void *data);
  2393.   void obstack_int_grow_fast (struct obstack *obstack, int data);
  2394. ! void obstack_blank_fast (struct obstack *obstack, size_t size);
  2395.   
  2396.   void * obstack_base (struct obstack *obstack);
  2397.   void * obstack_next_free (struct obstack *obstack);
  2398.   int obstack_alignment_mask (struct obstack *obstack);
  2399. ! size_t obstack_chunk_size (struct obstack *obstack);
  2400.   
  2401.   #endif /* __STDC__ */
  2402.   
  2403. ***************
  2404. *** 203,218 ****
  2405.   #define obstack_alignment_mask(h) ((h)->alignment_mask)
  2406.   
  2407.   #define obstack_init(h) \
  2408. !   _obstack_begin ((h), 0, 0, obstack_chunk_alloc, obstack_chunk_free)
  2409.   
  2410.   #define obstack_begin(h, size) \
  2411. !   _obstack_begin ((h), (size), 0, obstack_chunk_alloc, obstack_chunk_free)
  2412.   
  2413.   #define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = achar)
  2414.   
  2415.   #define obstack_blank_fast(h,n) ((h)->next_free += (n))
  2416.   
  2417. ! #if defined (__GNUC__) && defined (__STDC__)
  2418.   
  2419.   /* For GNU C, if not -traditional,
  2420.      we can define these macros to compute all args only once
  2421. --- 223,244 ----
  2422.   #define obstack_alignment_mask(h) ((h)->alignment_mask)
  2423.   
  2424.   #define obstack_init(h) \
  2425. !   _obstack_begin ((h), 0L, 0, \
  2426. !           (void *(*) ()) obstack_chunk_alloc, obstack_chunk_free)
  2427.   
  2428.   #define obstack_begin(h, size) \
  2429. !   _obstack_begin ((h), ((size_t)(size)), 0, \
  2430. !           (void *(*) ()) obstack_chunk_alloc, obstack_chunk_free)
  2431.   
  2432.   #define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = achar)
  2433.   
  2434.   #define obstack_blank_fast(h,n) ((h)->next_free += (n))
  2435.   
  2436. ! #ifdef __STDC__
  2437. ! #ifdef __GNUC__
  2438. ! #if __GNUC__ < 2
  2439. ! #define __extension__
  2440. ! #endif
  2441.   
  2442.   /* For GNU C, if not -traditional,
  2443.      we can define these macros to compute all args only once
  2444. ***************
  2445. *** 220,246 ****
  2446.      Also, we can avoid using the `temp' slot, to make faster code.  */
  2447.   
  2448.   #define obstack_object_size(OBSTACK)                    \
  2449.     ({ struct obstack *__o = (OBSTACK);                    \
  2450. !      (unsigned) (__o->next_free - __o->object_base); })
  2451.   
  2452.   #define obstack_room(OBSTACK)                        \
  2453.     ({ struct obstack *__o = (OBSTACK);                    \
  2454. !      (unsigned) (__o->chunk_limit - __o->next_free); })
  2455.   
  2456.   #define obstack_grow(OBSTACK,where,length)                \
  2457.   ({ struct obstack *__o = (OBSTACK);                    \
  2458. !    int __len = (length);                        \
  2459.      ((__o->next_free + __len > __o->chunk_limit)                \
  2460. !     ? _obstack_newchunk (__o, __len) : 0);                \
  2461.      bcopy (where, __o->next_free, __len);                \
  2462.      __o->next_free += __len;                        \
  2463.      (void) 0; })
  2464.   
  2465.   #define obstack_grow0(OBSTACK,where,length)                \
  2466.   ({ struct obstack *__o = (OBSTACK);                    \
  2467. !    int __len = (length);                        \
  2468.      ((__o->next_free + __len + 1 > __o->chunk_limit)            \
  2469. !     ? _obstack_newchunk (__o, __len + 1) : 0),                \
  2470.      bcopy (where, __o->next_free, __len),                \
  2471.      __o->next_free += __len,                        \
  2472.      *(__o->next_free)++ = 0;                        \
  2473. --- 246,281 ----
  2474.      Also, we can avoid using the `temp' slot, to make faster code.  */
  2475.   
  2476.   #define obstack_object_size(OBSTACK)                    \
  2477. +   __extension__                                \
  2478.     ({ struct obstack *__o = (OBSTACK);                    \
  2479. !      (size_t) (__o->next_free - __o->object_base); })
  2480.   
  2481.   #define obstack_room(OBSTACK)                        \
  2482. +   __extension__                                \
  2483.     ({ struct obstack *__o = (OBSTACK);                    \
  2484. !      (size_t) (__o->chunk_limit - __o->next_free); })
  2485.   
  2486. + /* Note that the call to _obstack_newchunk is enclosed in (..., 0)
  2487. +    so that we can avoid having void expressions
  2488. +    in the arms of the conditional expression.
  2489. +    Casting the third operand to void was tried before,
  2490. +    but some compilers won't accept it.  */
  2491.   #define obstack_grow(OBSTACK,where,length)                \
  2492. + __extension__                                \
  2493.   ({ struct obstack *__o = (OBSTACK);                    \
  2494. !    size_t __len = (length);                        \
  2495.      ((__o->next_free + __len > __o->chunk_limit)                \
  2496. !     ? (_obstack_newchunk (__o, __len), 0) : 0);                \
  2497.      bcopy (where, __o->next_free, __len);                \
  2498.      __o->next_free += __len;                        \
  2499.      (void) 0; })
  2500.   
  2501.   #define obstack_grow0(OBSTACK,where,length)                \
  2502. + __extension__                                \
  2503.   ({ struct obstack *__o = (OBSTACK);                    \
  2504. !    size_t __len = (length);                        \
  2505.      ((__o->next_free + __len + 1 > __o->chunk_limit)            \
  2506. !     ? (_obstack_newchunk (__o, __len + 1), 0) : 0),            \
  2507.      bcopy (where, __o->next_free, __len),                \
  2508.      __o->next_free += __len,                        \
  2509.      *(__o->next_free)++ = 0;                        \
  2510. ***************
  2511. *** 247,255 ****
  2512.      (void) 0; })
  2513.   
  2514.   #define obstack_1grow(OBSTACK,datum)                    \
  2515.   ({ struct obstack *__o = (OBSTACK);                    \
  2516.      ((__o->next_free + 1 > __o->chunk_limit)                \
  2517. !     ? _obstack_newchunk (__o, 1) : 0),                    \
  2518.      *(__o->next_free)++ = (datum);                    \
  2519.      (void) 0; })
  2520.   
  2521. --- 282,291 ----
  2522.      (void) 0; })
  2523.   
  2524.   #define obstack_1grow(OBSTACK,datum)                    \
  2525. + __extension__                                \
  2526.   ({ struct obstack *__o = (OBSTACK);                    \
  2527.      ((__o->next_free + 1 > __o->chunk_limit)                \
  2528. !     ? (_obstack_newchunk (__o, 1), 0) : 0),                \
  2529.      *(__o->next_free)++ = (datum);                    \
  2530.      (void) 0; })
  2531.   
  2532. ***************
  2533. *** 258,384 ****
  2534.      shares that much alignment.  */
  2535.      
  2536.   #define obstack_ptr_grow(OBSTACK,datum)                    \
  2537.   ({ struct obstack *__o = (OBSTACK);                    \
  2538.      ((__o->next_free + sizeof (void *) > __o->chunk_limit)        \
  2539. !     ? _obstack_newchunk (__o, sizeof (void *)) : 0),            \
  2540.      *((void **)__o->next_free)++ = ((void *)datum);            \
  2541.      (void) 0; })
  2542.   
  2543.   #define obstack_int_grow(OBSTACK,datum)                    \
  2544.   ({ struct obstack *__o = (OBSTACK);                    \
  2545.      ((__o->next_free + sizeof (int) > __o->chunk_limit)            \
  2546. !     ? _obstack_newchunk (__o, sizeof (int)) : 0),            \
  2547.      *((int *)__o->next_free)++ = ((int)datum);                \
  2548.      (void) 0; })
  2549.   
  2550.   #define obstack_ptr_grow_fast(h,aptr) (*((void **)(h)->next_free)++ = (void *)aptr)
  2551.   #define obstack_int_grow_fast(h,aint) (*((int *)(h)->next_free)++ = (int)aint)
  2552.   
  2553.   #define obstack_blank(OBSTACK,length)                    \
  2554.   ({ struct obstack *__o = (OBSTACK);                    \
  2555. !    int __len = (length);                        \
  2556. !    ((__o->next_free + __len > __o->chunk_limit)                \
  2557. !     ? _obstack_newchunk (__o, __len) : 0);                \
  2558.      __o->next_free += __len;                        \
  2559.      (void) 0; })
  2560.   
  2561.   #define obstack_alloc(OBSTACK,length)                    \
  2562.   ({ struct obstack *__h = (OBSTACK);                    \
  2563.      obstack_blank (__h, (length));                    \
  2564.      obstack_finish (__h); })
  2565.   
  2566.   #define obstack_copy(OBSTACK,where,length)                \
  2567.   ({ struct obstack *__h = (OBSTACK);                    \
  2568.      obstack_grow (__h, (where), (length));                \
  2569.      obstack_finish (__h); })
  2570.   
  2571.   #define obstack_copy0(OBSTACK,where,length)                \
  2572.   ({ struct obstack *__h = (OBSTACK);                    \
  2573.      obstack_grow0 (__h, (where), (length));                \
  2574.      obstack_finish (__h); })
  2575.   
  2576.   #define obstack_finish(OBSTACK)                      \
  2577. ! ({ struct obstack *__o = (OBSTACK);                    \
  2578. !    void *value = (void *) __o->object_base;                \
  2579. !    __o->next_free                            \
  2580. !      = __INT_TO_PTR ((__PTR_TO_INT (__o->next_free)+__o->alignment_mask)\
  2581. !              & ~ (__o->alignment_mask));            \
  2582. !    ((__o->next_free - (char *)__o->chunk                \
  2583. !      > __o->chunk_limit - (char *)__o->chunk)                \
  2584. !     ? (__o->next_free = __o->chunk_limit) : 0);                \
  2585. !    __o->object_base = __o->next_free;                    \
  2586.      value; })
  2587.   
  2588.   #define obstack_free(OBSTACK, OBJ)                    \
  2589.   ({ struct obstack *__o = (OBSTACK);                    \
  2590.      void *__obj = (OBJ);                            \
  2591. !    if (__obj >= (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \
  2592.        __o->next_free = __o->object_base = __obj;                \
  2593.      else (obstack_free) (__o, __obj); })
  2594.   
  2595. ! #else /* not __GNUC__ or not __STDC__ */
  2596. ! /* The non-GNU macros copy the obstack-pointer into this global variable
  2597. !    to avoid multiple evaluation.  */
  2598.   
  2599. ! extern struct obstack *_obstack;
  2600.   
  2601.   #define obstack_object_size(h) \
  2602. !  (unsigned) (_obstack = (h), (h)->next_free - (h)->object_base)
  2603.   
  2604.   #define obstack_room(h)        \
  2605. !  (unsigned) (_obstack = (h), (h)->chunk_limit - (h)->next_free)
  2606.   
  2607.   #define obstack_grow(h,where,length)                    \
  2608.   ( (h)->temp = (length),                            \
  2609.     (((h)->next_free + (h)->temp > (h)->chunk_limit)            \
  2610. !    ? _obstack_newchunk ((h), (h)->temp) : 0),                \
  2611. !   bcopy (where, (h)->next_free, (h)->temp),                \
  2612.     (h)->next_free += (h)->temp)
  2613.   
  2614.   #define obstack_grow0(h,where,length)                    \
  2615.   ( (h)->temp = (length),                            \
  2616.     (((h)->next_free + (h)->temp + 1 > (h)->chunk_limit)            \
  2617. !    ? _obstack_newchunk ((h), (h)->temp + 1) : 0),                \
  2618. !   bcopy (where, (h)->next_free, (h)->temp),                \
  2619.     (h)->next_free += (h)->temp,                        \
  2620.     *((h)->next_free)++ = 0)
  2621.   
  2622.   #define obstack_1grow(h,datum)                        \
  2623.   ( (((h)->next_free + 1 > (h)->chunk_limit)                \
  2624. !    ? _obstack_newchunk ((h), 1) : 0),                    \
  2625.     *((h)->next_free)++ = (datum))
  2626.   
  2627.   #define obstack_ptr_grow(h,datum)                    \
  2628.   ( (((h)->next_free + sizeof (char *) > (h)->chunk_limit)        \
  2629. !    ? _obstack_newchunk ((h), sizeof (char *)) : 0),            \
  2630. !   *((char **)(h)->next_free)++ = ((char *)datum))
  2631.   
  2632.   #define obstack_int_grow(h,datum)                    \
  2633.   ( (((h)->next_free + sizeof (int) > (h)->chunk_limit)            \
  2634. !    ? _obstack_newchunk ((h), sizeof (int)) : 0),            \
  2635. !   *((int *)(h)->next_free)++ = ((int)datum))
  2636.   
  2637.   #define obstack_ptr_grow_fast(h,aptr) (*((char **)(h)->next_free)++ = (char *)aptr)
  2638.   #define obstack_int_grow_fast(h,aint) (*((int *)(h)->next_free)++ = (int)aint)
  2639.   
  2640.   #define obstack_blank(h,length)                        \
  2641.   ( (h)->temp = (length),                            \
  2642. !   (((h)->next_free + (h)->temp > (h)->chunk_limit)            \
  2643. !    ? _obstack_newchunk ((h), (h)->temp) : 0),                \
  2644.     (h)->next_free += (h)->temp)
  2645.   
  2646.   #define obstack_alloc(h,length)                        \
  2647. !  (obstack_blank ((h), (length)), obstack_finish ((h)))
  2648.   
  2649.   #define obstack_copy(h,where,length)                    \
  2650. !  (obstack_grow ((h), (where), (length)), obstack_finish ((h)))
  2651.   
  2652.   #define obstack_copy0(h,where,length)                    \
  2653. !  (obstack_grow0 ((h), (where), (length)), obstack_finish ((h)))
  2654.   
  2655.   #define obstack_finish(h)                          \
  2656. ! ( (h)->temp = __PTR_TO_INT ((h)->object_base),                \
  2657.     (h)->next_free                            \
  2658.       = __INT_TO_PTR ((__PTR_TO_INT ((h)->next_free)+(h)->alignment_mask)    \
  2659.               & ~ ((h)->alignment_mask)),                \
  2660. --- 294,447 ----
  2661.      shares that much alignment.  */
  2662.      
  2663.   #define obstack_ptr_grow(OBSTACK,datum)                    \
  2664. + __extension__                                \
  2665.   ({ struct obstack *__o = (OBSTACK);                    \
  2666.      ((__o->next_free + sizeof (void *) > __o->chunk_limit)        \
  2667. !     ? (_obstack_newchunk (__o, sizeof (void *)), 0) : 0),        \
  2668.      *((void **)__o->next_free)++ = ((void *)datum);            \
  2669.      (void) 0; })
  2670.   
  2671.   #define obstack_int_grow(OBSTACK,datum)                    \
  2672. + __extension__                                \
  2673.   ({ struct obstack *__o = (OBSTACK);                    \
  2674.      ((__o->next_free + sizeof (int) > __o->chunk_limit)            \
  2675. !     ? (_obstack_newchunk (__o, sizeof (int)), 0) : 0),            \
  2676.      *((int *)__o->next_free)++ = ((int)datum);                \
  2677.      (void) 0; })
  2678.   
  2679. + #define obstack_long_grow(OBSTACK,datum)                    \
  2680. + __extension__                                \
  2681. + ({ struct obstack *__o = (OBSTACK);                    \
  2682. +    ((__o->next_free + sizeof (long) > __o->chunk_limit)            \
  2683. +     ? (_obstack_newchunk (__o, sizeof (long)), 0) : 0),            \
  2684. +    *((long *)__o->next_free)++ = ((long)datum);                \
  2685. +    (void) 0; })
  2686.   #define obstack_ptr_grow_fast(h,aptr) (*((void **)(h)->next_free)++ = (void *)aptr)
  2687.   #define obstack_int_grow_fast(h,aint) (*((int *)(h)->next_free)++ = (int)aint)
  2688. + #define obstack_long_grow_fast(h,along) (*((long *)(h)->next_free)++ = (long)along)
  2689.   
  2690.   #define obstack_blank(OBSTACK,length)                    \
  2691. + __extension__                                \
  2692.   ({ struct obstack *__o = (OBSTACK);                    \
  2693. !    size_t __len = (length);                        \
  2694. !    ((__o->chunk_limit - __o->next_free < __len)                \
  2695. !     ? (_obstack_newchunk (__o, __len), 0) : 0);                \
  2696.      __o->next_free += __len;                        \
  2697.      (void) 0; })
  2698.   
  2699.   #define obstack_alloc(OBSTACK,length)                    \
  2700. + __extension__                                \
  2701.   ({ struct obstack *__h = (OBSTACK);                    \
  2702.      obstack_blank (__h, (length));                    \
  2703.      obstack_finish (__h); })
  2704.   
  2705.   #define obstack_copy(OBSTACK,where,length)                \
  2706. + __extension__                                \
  2707.   ({ struct obstack *__h = (OBSTACK);                    \
  2708.      obstack_grow (__h, (where), (length));                \
  2709.      obstack_finish (__h); })
  2710.   
  2711.   #define obstack_copy0(OBSTACK,where,length)                \
  2712. + __extension__                                \
  2713.   ({ struct obstack *__h = (OBSTACK);                    \
  2714.      obstack_grow0 (__h, (where), (length));                \
  2715.      obstack_finish (__h); })
  2716.   
  2717. + /* The local variable is named __o1 to avoid a name conflict
  2718. +    when obstack_blank is called.  */
  2719.   #define obstack_finish(OBSTACK)                      \
  2720. ! __extension__                                \
  2721. ! ({ struct obstack *__o1 = (OBSTACK);                    \
  2722. !    void *value = (void *) __o1->object_base;                \
  2723. !    if (__o1->next_free == value)                    \
  2724. !      __o1->maybe_empty_object = 1;                    \
  2725. !    __o1->next_free                            \
  2726. !      = __INT_TO_PTR ((__PTR_TO_INT (__o1->next_free)+__o1->alignment_mask)\
  2727. !              & ~ (__o1->alignment_mask));            \
  2728. !    ((__o1->next_free - (char *)__o1->chunk                \
  2729. !      > __o1->chunk_limit - (char *)__o1->chunk)                \
  2730. !     ? (__o1->next_free = __o1->chunk_limit) : 0);            \
  2731. !    __o1->object_base = __o1->next_free;                    \
  2732.      value; })
  2733.   
  2734.   #define obstack_free(OBSTACK, OBJ)                    \
  2735. + __extension__                                \
  2736.   ({ struct obstack *__o = (OBSTACK);                    \
  2737.      void *__obj = (OBJ);                            \
  2738. !    if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit)  \
  2739.        __o->next_free = __o->object_base = __obj;                \
  2740.      else (obstack_free) (__o, __obj); })
  2741.   
  2742. ! #endif /* __GNUC__ */
  2743.   
  2744. ! #else /* not __GNUC__ or not __STDC__ */
  2745.   
  2746.   #define obstack_object_size(h) \
  2747. !  (size_t) ((h)->next_free - (h)->object_base)
  2748.   
  2749.   #define obstack_room(h)        \
  2750. !  (size_t) ((h)->chunk_limit - (h)->next_free)
  2751.   
  2752.   #define obstack_grow(h,where,length)                    \
  2753.   ( (h)->temp = (length),                            \
  2754.     (((h)->next_free + (h)->temp > (h)->chunk_limit)            \
  2755. !    ? (_obstack_newchunk ((h), (size_t)(h)->temp), 0) : 0),        \
  2756. !   bcopy (where, (h)->next_free, (size_t)((h)->temp)),            \
  2757.     (h)->next_free += (h)->temp)
  2758.   
  2759.   #define obstack_grow0(h,where,length)                    \
  2760.   ( (h)->temp = (length),                            \
  2761.     (((h)->next_free + (h)->temp + 1 > (h)->chunk_limit)            \
  2762. !    ? (_obstack_newchunk ((h), (size_t)(h)->temp + 1), 0) : 0),        \
  2763. !   bcopy (where, (h)->next_free, (size_t)((h)->temp)),            \
  2764.     (h)->next_free += (h)->temp,                        \
  2765.     *((h)->next_free)++ = 0)
  2766.   
  2767.   #define obstack_1grow(h,datum)                        \
  2768.   ( (((h)->next_free + 1 > (h)->chunk_limit)                \
  2769. !    ? (_obstack_newchunk ((h), 1L), 0) : 0),                \
  2770.     *((h)->next_free)++ = (datum))
  2771.   
  2772.   #define obstack_ptr_grow(h,datum)                    \
  2773.   ( (((h)->next_free + sizeof (char *) > (h)->chunk_limit)        \
  2774. !    ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0),        \
  2775. !   *((char **)(((h)->next_free+=sizeof(char *))-sizeof(char *))) = ((char *)datum))
  2776.   
  2777.   #define obstack_int_grow(h,datum)                    \
  2778.   ( (((h)->next_free + sizeof (int) > (h)->chunk_limit)            \
  2779. !    ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0),            \
  2780. !   *((int *)(((h)->next_free+=sizeof(int))-sizeof(int))) = ((int)datum))
  2781.   
  2782. + #define obstack_long_grow(h,datum)                    \
  2783. + ( (((h)->next_free + sizeof (long) > (h)->chunk_limit)            \
  2784. +    ? (_obstack_newchunk ((h), sizeof (long)), 0) : 0),            \
  2785. +   *((long *)(((h)->next_free+=sizeof(long))-sizeof(long))) = ((long)datum))
  2786.   #define obstack_ptr_grow_fast(h,aptr) (*((char **)(h)->next_free)++ = (char *)aptr)
  2787.   #define obstack_int_grow_fast(h,aint) (*((int *)(h)->next_free)++ = (int)aint)
  2788. + #define obstack_long_grow_fast(h,along) (*((long *)(h)->next_free)++ = (long)along)
  2789.   
  2790.   #define obstack_blank(h,length)                        \
  2791.   ( (h)->temp = (length),                            \
  2792. !   (((h)->chunk_limit - (h)->next_free < (h)->temp)            \
  2793. !    ? (_obstack_newchunk ((h), (size_t)(h)->temp), 0) : 0),            \
  2794.     (h)->next_free += (h)->temp)
  2795.   
  2796.   #define obstack_alloc(h,length)                        \
  2797. !  (obstack_blank ((h), (size_t)(length)), obstack_finish ((h)))
  2798.   
  2799.   #define obstack_copy(h,where,length)                    \
  2800. !  (obstack_grow ((h), (where), (size_t)(length)), obstack_finish ((h)))
  2801.   
  2802.   #define obstack_copy0(h,where,length)                    \
  2803. !  (obstack_grow0 ((h), (where), (size_t)(length)), obstack_finish ((h)))
  2804.   
  2805.   #define obstack_finish(h)                          \
  2806. ! ( ((h)->next_free == (h)->object_base                    \
  2807. !    ? (((h)->maybe_empty_object = 1), 0)                    \
  2808. !    : 0),                                \
  2809. !   (h)->temp = __PTR_TO_INT ((h)->object_base),                \
  2810.     (h)->next_free                            \
  2811.       = __INT_TO_PTR ((__PTR_TO_INT ((h)->next_free)+(h)->alignment_mask)    \
  2812.               & ~ ((h)->alignment_mask)),                \
  2813. ***************
  2814. *** 391,410 ****
  2815.   #ifdef __STDC__
  2816.   #define obstack_free(h,obj)                        \
  2817.   ( (h)->temp = (char *)(obj) - (char *) (h)->chunk,            \
  2818. !   (((h)->temp >= 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
  2819.      ? (int) ((h)->next_free = (h)->object_base                \
  2820.           = (h)->temp + (char *) (h)->chunk)                \
  2821. !    : ((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0)))
  2822.   #else
  2823.   #define obstack_free(h,obj)                        \
  2824.   ( (h)->temp = (char *)(obj) - (char *) (h)->chunk,            \
  2825. !   (((h)->temp >= 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
  2826.      ? (int) ((h)->next_free = (h)->object_base                \
  2827.           = (h)->temp + (char *) (h)->chunk)                \
  2828. !    : (int) _obstack_free ((h), (h)->temp + (char *) (h)->chunk)))
  2829.   #endif
  2830.   
  2831.   #endif /* not __GNUC__ or not __STDC__ */
  2832.   
  2833.   #endif /* not __OBSTACKS__ */
  2834. --- 454,472 ----
  2835.   #ifdef __STDC__
  2836.   #define obstack_free(h,obj)                        \
  2837.   ( (h)->temp = (char *)(obj) - (char *) (h)->chunk,            \
  2838. !   (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
  2839.      ? (int) ((h)->next_free = (h)->object_base                \
  2840.           = (h)->temp + (char *) (h)->chunk)                \
  2841. !    : (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0)))
  2842.   #else
  2843.   #define obstack_free(h,obj)                        \
  2844.   ( (h)->temp = (char *)(obj) - (char *) (h)->chunk,            \
  2845. !   (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
  2846.      ? (int) ((h)->next_free = (h)->object_base                \
  2847.           = (h)->temp + (char *) (h)->chunk)                \
  2848. !    : (_obstack_free ((h), (h)->temp + (char *) (h)->chunk), 0)))
  2849.   #endif
  2850.   
  2851.   #endif /* not __GNUC__ or not __STDC__ */
  2852.   
  2853.   #endif /* not __OBSTACKS__ */
  2854. *** 1.26    1992/03/22 22:05:23
  2855. --- osbind.h    1992/06/03 15:27:02
  2856. ***************
  2857. *** 99,105 ****
  2858.   #ifndef _OSBIND_H
  2859.   #define _OSBIND_H
  2860.   
  2861. ! #if defined(__cplusplus)
  2862.   extern "C" {
  2863.   #endif
  2864.   
  2865. --- 99,109 ----
  2866.   #ifndef _OSBIND_H
  2867.   #define _OSBIND_H
  2868.   
  2869. ! #ifndef _COMPILER_H
  2870. ! #include <compiler.h>
  2871. ! #endif
  2872. ! #ifdef __cplusplus
  2873.   extern "C" {
  2874.   #endif
  2875.   
  2876. ***************
  2877. *** 110,116 ****
  2878.   /* want to skip all the gory details of GNU C inlines??
  2879.      search for the string "DEFINITIONS" */
  2880.   
  2881. ! #if ((defined(__GNUC__)) && (!defined(__NO_INLINE__)))
  2882.   /*
  2883.    * GNU C (pseudo inline) Statement Exprs for traps
  2884.    *
  2885. --- 114,120 ----
  2886.   /* want to skip all the gory details of GNU C inlines??
  2887.      search for the string "DEFINITIONS" */
  2888.   
  2889. ! #ifdef __GNUC_INLINE__
  2890.   /*
  2891.    * GNU C (pseudo inline) Statement Exprs for traps
  2892.    *
  2893. ***************
  2894. *** 800,816 ****
  2895.       retvalue;                            \
  2896.   })
  2897.   
  2898.   
  2899. ! #else /* __GNUC__ && !__NO_INLINE__ */
  2900.   #  ifdef __GNUC__
  2901.   
  2902. ! #ifndef __MINT__
  2903.   /* if inlines are not allowed, then declare things external */
  2904. - #ifndef _COMPILER_H
  2905. - #include <compiler.h>
  2906. - #endif
  2907.   __EXTERN long trap_1_w __PROTO((short n));
  2908.   __EXTERN long trap_1_ww __PROTO((short n, short a));
  2909.   __EXTERN long trap_1_wl __PROTO((short n, long a));
  2910. --- 804,845 ----
  2911.       retvalue;                            \
  2912.   })
  2913.   
  2914. + #define trap_14_wwwl(n, a, b, c)                    \
  2915. + ({                                    \
  2916. +     register long retvalue __asm__("d0");                \
  2917. +     short _a = (short)(a);                        \
  2918. +     short _b = (short)(b);                        \
  2919. +     long  _c = (long)(c);                        \
  2920. +                                         \
  2921. +     __asm__ volatile                        \
  2922. +     ("                                \
  2923. +         movl    %4,sp@-;                    \
  2924. +         movw    %3,sp@-;                    \
  2925. +         movw    %2,sp@-;                    \
  2926. +         movw    %1,sp@-;                    \
  2927. +         trap    #14;                        \
  2928. +         addqw   #6,sp "                        \
  2929. +     : "=r"(retvalue)            /* outputs */        \
  2930. +     : "g"(n), "r"(_a), "r"(_b), "r"(_c)    /* inputs  */        \
  2931. +     : "d0", "d1", "d2", "a0", "a1", "a2"    /* clobbered regs */    \
  2932. +     );                                \
  2933. +     retvalue;                            \
  2934. + })
  2935. + #else /* __GNUC_INLINE__ */
  2936.   
  2937. ! # ifndef __MSHORT__
  2938. ! #  define _TRAP_X_
  2939. ! # else
  2940.   #  ifdef __GNUC__
  2941. + #   ifndef __MINT__
  2942. + #    define _TRAP_X_
  2943. + #   endif
  2944. + #  endif
  2945. + # endif /* !__MSHORT__ */
  2946.   
  2947. ! # ifdef _TRAP_X_
  2948.   /* if inlines are not allowed, then declare things external */
  2949.   __EXTERN long trap_1_w __PROTO((short n));
  2950.   __EXTERN long trap_1_ww __PROTO((short n, short a));
  2951.   __EXTERN long trap_1_wl __PROTO((short n, long a));
  2952. ***************
  2953. *** 842,854 ****
  2954.   __EXTERN long trap_14_wwwwl __PROTO((short n, short a, short b, short c, long d));
  2955.   __EXTERN long trap_14_wwwl __PROTO((short n, short a, short b, long c));
  2956.   
  2957. ! #endif /* !__MINT__ */
  2958. ! #if defined(__MINT__) && defined(__MSHORT__)
  2959.   
  2960. ! /* compilers with 16 bit integers, including gcc -mshort */
  2961. ! extern long gemdos(), bios(), xbios();
  2962.   #define trap_1_w    gemdos
  2963.   #define trap_1_ww    gemdos
  2964.   #define trap_1_wl    gemdos
  2965. --- 871,882 ----
  2966.   __EXTERN long trap_14_wwwwl __PROTO((short n, short a, short b, short c, long d));
  2967.   __EXTERN long trap_14_wwwl __PROTO((short n, short a, short b, long c));
  2968.   
  2969. ! # else /* __TRAP_X__ */
  2970.   
  2971. ! __EXTERN long gemdos    __PROTO((short, ...));
  2972. ! __EXTERN long bios    __PROTO((short, ...));
  2973. ! __EXTERN long xbios    __PROTO((short, ...));
  2974. !  
  2975.   #define trap_1_w    gemdos
  2976.   #define trap_1_ww    gemdos
  2977.   #define trap_1_wl    gemdos
  2978. ***************
  2979. *** 882,894 ****
  2980.   #define trap_14_wllwwwwlw    xbios
  2981.   #define trap_14_wllwwwwwlw    xbios
  2982.   
  2983. ! #  endif /* __MINT_ && __MSHORT__ */
  2984. ! #  else /* !__GNUC__ */
  2985. ! #    error "confucious says: \"you've got a brain dead C compiler\""
  2986. ! #  endif /* __GNUC__ */
  2987.   
  2988. ! #endif /* __GNUC__ && !__NO_INLINE__ */
  2989.   
  2990.   
  2991.   /* DEFINITIONS FOR OS FUNCTIONS */
  2992. --- 910,918 ----
  2993.   #define trap_14_wllwwwwlw    xbios
  2994.   #define trap_14_wllwwwwwlw    xbios
  2995.   
  2996. ! # endif /* _TRAP_X_ */
  2997.   
  2998. ! #endif /* __GNUC_INLINE__ */
  2999.   
  3000.   
  3001.   /* DEFINITIONS FOR OS FUNCTIONS */
  3002. ***************
  3003. *** 1039,1051 ****
  3004.   #define           Bconin(dev)                           \
  3005.          (long)trap_13_ww((short)(0x02),(short)(dev))
  3006.   #define           Bconout(dev,c)                           \
  3007. !        (void)trap_13_www((short)(0x03),(short)(dev),(short)((c) & 0xFF))
  3008.   /* since AHDI 3.1 there is a new call to Rwabs with one more parameter */
  3009.   #define           Rwabs(rwflag,buf,n,sector,d)            \
  3010. !        (short)trap_13_wwlwww((short)(0x04),(short)(rwflag),(long)(buf), \
  3011.                    (short)(n),(short)(sector),(short)(d))
  3012.   #define           Setexc(vnum,vptr)                       \
  3013. !        (void (*)(void))trap_13_wwl((short)(0x05),(short)(vnum),(long)(vptr))
  3014.   #define           Tickcal()                           \
  3015.          (long)trap_13_w((short)(0x06))
  3016.   #define           Getbpb(d)                           \
  3017. --- 1063,1075 ----
  3018.   #define           Bconin(dev)                           \
  3019.          (long)trap_13_ww((short)(0x02),(short)(dev))
  3020.   #define           Bconout(dev,c)                           \
  3021. !        (long)trap_13_www((short)(0x03),(short)(dev),(short)((c) & 0xFF))
  3022.   /* since AHDI 3.1 there is a new call to Rwabs with one more parameter */
  3023.   #define           Rwabs(rwflag,buf,n,sector,d)            \
  3024. !        (long)trap_13_wwlwww((short)(0x04),(short)(rwflag),(long)(buf), \
  3025.                    (short)(n),(short)(sector),(short)(d))
  3026.   #define           Setexc(vnum,vptr)                       \
  3027. !        (void (*) __PROTO((void)))trap_13_wwl((short)(0x05),(short)(vnum),(long)(vptr))
  3028.   #define           Tickcal()                           \
  3029.          (long)trap_13_w((short)(0x06))
  3030.   #define           Getbpb(d)                           \
  3031. ***************
  3032. *** 1144,1150 ****
  3033.          (void)trap_14_wl((short)(0x20),(long)(ptr))
  3034.   #define           Setprt(config)                           \
  3035.          (short)trap_14_ww((short)(0x21),(short)(config))
  3036. ! #define        Kbdvbase()                                              \
  3037.          (_KBDVECS*)trap_14_w((short)(0x22))
  3038.   #define           Kbrate(delay,reprate)                       \
  3039.          (short)trap_14_www((short)(0x23),(short)(delay),(short)(reprate))
  3040. --- 1168,1174 ----
  3041.          (void)trap_14_wl((short)(0x20),(long)(ptr))
  3042.   #define           Setprt(config)                           \
  3043.          (short)trap_14_ww((short)(0x21),(short)(config))
  3044. ! #define           Kbdvbase()                           \
  3045.          (_KBDVECS*)trap_14_w((short)(0x22))
  3046.   #define           Kbrate(delay,reprate)                       \
  3047.          (short)trap_14_www((short)(0x23),(short)(delay),(short)(reprate))
  3048. ***************
  3049. *** 1172,1209 ****
  3050.    * extensions for TT TOS
  3051.    */
  3052.   
  3053. - #if ((defined(__GNUC__)) && (!defined(__NO_INLINE__)))
  3054. - #define trap_14_wwwl(n, a, b, c)                    \
  3055. - ({                                    \
  3056. -     register long retvalue __asm__("d0");                \
  3057. -     short _a = (short)(a);                        \
  3058. -     short _b = (short)(b);                        \
  3059. -     long  _c = (long)(c);                        \
  3060. -                                         \
  3061. -     __asm__ volatile                        \
  3062. -     ("                                \
  3063. -         movl    %4,sp@-;                    \
  3064. -         movw    %3,sp@-;                    \
  3065. -         movw    %2,sp@-;                    \
  3066. -         movw    %1,sp@-;                    \
  3067. -         trap    #14;                        \
  3068. -         addqw   #6,sp "                        \
  3069. -     : "=r"(retvalue)            /* outputs */        \
  3070. -     : "g"(n), "r"(_a), "r"(_b), "r"(_c)    /* inputs  */        \
  3071. -     : "d0", "d1", "d2", "a0", "a1", "a2"    /* clobbered regs */    \
  3072. -     );                                \
  3073. -     retvalue;                            \
  3074. - })
  3075. - #else
  3076. - #  ifdef __GNUC__
  3077. - long trap_14_wwwl(short n, short a, short b, long c);
  3078. - #  else /* !__GNUC__ */
  3079. - #    error "confucious says: \"you've got a brain dead C compiler\""
  3080. - #  endif /* __GNUC__ */
  3081. - #endif /* __GNUC__ && !__NO_INLINE__ */
  3082.   #define         Mxalloc(amt,flag)                    \
  3083.       (long)trap_1_wlw((short)(0x44),(long)(amt),(short)(flag))
  3084.   #define        Maddalt(start,size)                    \
  3085. --- 1196,1201 ----
  3086. ***************
  3087. *** 1210,1216 ****
  3088.       (long)trap_1_wll((short)(0x14),(long)(start),(long)(size))
  3089.   
  3090.   #define            Setpalette(palptr)                    \
  3091. !         (void)trap_14_wl((short)(0x06),(long)(palptr))
  3092.   #define         EsetShift(mode)                        \
  3093.       (void)trap_14_ww((short)(80),(short)mode)
  3094.   #define         EgetShift()                        \
  3095. --- 1202,1208 ----
  3096.       (long)trap_1_wll((short)(0x14),(long)(start),(long)(size))
  3097.   
  3098.   #define            Setpalette(palptr)                    \
  3099. !     (void)trap_14_wl((short)(0x06),(long)(palptr))
  3100.   #define         EsetShift(mode)                        \
  3101.       (void)trap_14_ww((short)(80),(short)mode)
  3102.   #define         EgetShift()                        \
  3103. ***************
  3104. *** 1227,1236 ****
  3105.       (short)trap_14_ww((short)(86),(short)mode)
  3106.   #define         EsetSmear(mode)                        \
  3107.       (short)trap_14_ww((short)(87),(short)mode)
  3108. ! #define           Bconmap(dev)                           \
  3109. !        (long)trap_14_ww((short)(0x2b),(short)(dev))
  3110. ! #define           Bconctl(opcode,operand)                                 \
  3111. !        (long)trap_14_wwl((short)(0x2d),(short)(opcode),(long)(operand))
  3112.   
  3113.   /*  Wake-up call for ST BOOK -- takes date/time pair in DOS format. */
  3114.   
  3115. --- 1219,1236 ----
  3116.       (short)trap_14_ww((short)(86),(short)mode)
  3117.   #define         EsetSmear(mode)                        \
  3118.       (short)trap_14_ww((short)(87),(short)mode)
  3119. ! #define        DMAread(sector,count,buffer,devno)            \
  3120. !     (long)trap_14_wlwlw((short)0x2a,(long)sector,(short)count,(long)buffer, \
  3121. !                 (short)devno)
  3122. ! #define        DMAwrite(sector,count,buffer,devno)            \
  3123. !     (long)trap_14_wlwlw((short)0x2b,(long)sector,(short)count,(long)buffer, \
  3124. !             (short)devno)
  3125. ! #define        Bconmap(dev)                        \
  3126. !     (long)trap_14_ww((short)0x2c,(short)(dev))
  3127. ! #define        NVMaccess(op,start,count,buf)                \
  3128. !     (short)trap_14_wwwwl((short)0x2e,(short)op,(short)start,(short)count, \
  3129. !             (long)buf)
  3130.   
  3131.   /*  Wake-up call for ST BOOK -- takes date/time pair in DOS format. */
  3132.   
  3133. ***************
  3134. *** 1239,1245 ****
  3135.                          (unsigned short)(w_time))
  3136.   
  3137.   
  3138. ! #if defined(__cplusplus)
  3139.   }
  3140.   #endif
  3141.   
  3142. --- 1239,1245 ----
  3143.                          (unsigned short)(w_time))
  3144.   
  3145.   
  3146. ! #ifdef __cplusplus
  3147.   }
  3148.   #endif
  3149.   
  3150. *** 1.3    1992/03/22 22:05:23
  3151. --- ostruct.h    1992/06/03 15:27:03
  3152. ***************
  3153. *** 1,9 ****
  3154.   #ifndef _OSTRUCT_H
  3155.   #define _OSTRUCT_H
  3156.   
  3157.   #include <compiler.h>
  3158.   
  3159. ! #if defined(__cplusplus)
  3160.   extern "C" {
  3161.   #endif
  3162.   
  3163. --- 1,11 ----
  3164.   #ifndef _OSTRUCT_H
  3165.   #define _OSTRUCT_H
  3166.   
  3167. + #ifndef _COMPILER_H
  3168.   #include <compiler.h>
  3169. + #endif
  3170.   
  3171. ! #ifdef __cplusplus
  3172.   extern "C" {
  3173.   #endif
  3174.   
  3175. ***************
  3176. *** 154,160 ****
  3177.       void *caps;        /* pointer to capslock keys */
  3178.   } _KEYTAB;
  3179.   
  3180. ! #if defined(__cplusplus)
  3181.   }
  3182.   #endif
  3183.   
  3184. --- 156,162 ----
  3185.       void *caps;        /* pointer to capslock keys */
  3186.   } _KEYTAB;
  3187.   
  3188. ! #ifdef __cplusplus
  3189.   }
  3190.   #endif
  3191.   
  3192. *** 1.7    1991/04/12 18:54:17
  3193. --- param.h    1992/06/03 15:27:03
  3194. ***************
  3195. *** 1,15 ****
  3196. - /*
  3197. -  *        Cross Development System for Atari ST 
  3198. -  *     Copyright (c) 1988, Memorial University of Newfoundland
  3199. -  *
  3200. -  */
  3201.   #ifndef _PARAM_H
  3202.   #define _PARAM_H
  3203.   
  3204.   #define    MAXPATHLEN    128        /* same as FILENAME_MAX in stdio.h */
  3205. ! #define    NOFILE        20        /* max. number of open files/proc  */
  3206. ! #define NCARGS          126             /* max number of chars in argv     */
  3207.   
  3208. ! #define HZ        60        /* ticks/second reported by times() */
  3209.   
  3210.   #endif /* _PARAM_H */
  3211. --- 1,15 ----
  3212.   #ifndef _PARAM_H
  3213.   #define _PARAM_H
  3214.   
  3215.   #define    MAXPATHLEN    128        /* same as FILENAME_MAX in stdio.h */
  3216. ! #define    NOFILE        20        /* same as OPEN_MAX in limits.h */
  3217.   
  3218. ! #ifdef __MINT__
  3219. ! # define HZ        200        /* ticks/second reported by times() */
  3220. ! # define NCARGS        1024        /* actually, we don't limit this */
  3221. ! #else
  3222. ! # define HZ        60        /* ticks/second reported by times() */
  3223. ! # define NCARGS        126        /* max. no. of characters in argv */
  3224. ! #endif
  3225.   
  3226.   #endif /* _PARAM_H */
  3227. *** 1.8    1991/06/20 02:21:30
  3228. --- process.h    1992/06/03 15:27:03
  3229. ***************
  3230. *** 3,21 ****
  3231.   #ifndef _PROCESS_H
  3232.   #define _PROCESS_H
  3233.   
  3234. ! #if defined(__cplusplus)
  3235. ! extern "C" {
  3236.   #endif
  3237.   
  3238.   
  3239.   #define P_WAIT        0
  3240.   #define P_NOWAIT    1
  3241.   #define P_OVERLAY    2
  3242.   
  3243. - #ifndef _COMPILER_H
  3244. - #include <compiler.h>
  3245. - #endif
  3246.   __EXTERN int    spawnv    __PROTO((int, char *, char **));
  3247.   __EXTERN int    spawnve    __PROTO((int, char *, char **, char **));
  3248.   __EXTERN int    _spawnve __PROTO((int, char *, char **, char **));
  3249. --- 3,20 ----
  3250.   #ifndef _PROCESS_H
  3251.   #define _PROCESS_H
  3252.   
  3253. ! #ifndef _COMPILER_H
  3254. ! #include <compiler.h>
  3255.   #endif
  3256.   
  3257. + #ifdef __cplusplus
  3258. + extern "C" {
  3259. + #endif
  3260.   
  3261.   #define P_WAIT        0
  3262.   #define P_NOWAIT    1
  3263.   #define P_OVERLAY    2
  3264.   
  3265.   __EXTERN int    spawnv    __PROTO((int, char *, char **));
  3266.   __EXTERN int    spawnve    __PROTO((int, char *, char **, char **));
  3267.   __EXTERN int    _spawnve __PROTO((int, char *, char **, char **));
  3268. ***************
  3269. *** 24,30 ****
  3270.   __EXTERN int    spawnl    __PROTO((int, char *, ...));
  3271.   __EXTERN int    spawnlp    __PROTO((int, char *, ...));
  3272.   
  3273. ! #if defined(__cplusplus)
  3274.   }
  3275.   #endif
  3276.   
  3277. --- 23,29 ----
  3278.   __EXTERN int    spawnl    __PROTO((int, char *, ...));
  3279.   __EXTERN int    spawnlp    __PROTO((int, char *, ...));
  3280.   
  3281. ! #ifdef __cplusplus
  3282.   }
  3283.   #endif
  3284.   
  3285. *** 1.9    1992/01/29 21:08:08
  3286. --- pwd.h    1992/06/03 15:27:03
  3287. ***************
  3288. *** 10,16 ****
  3289.   #include <types.h>
  3290.   #endif
  3291.   
  3292. ! #if defined(__cplusplus)
  3293.   extern "C" {
  3294.   #endif
  3295.   
  3296. --- 10,16 ----
  3297.   #include <types.h>
  3298.   #endif
  3299.   
  3300. ! #ifdef __cplusplus
  3301.   extern "C" {
  3302.   #endif
  3303.   
  3304. ***************
  3305. *** 27,42 ****
  3306.   #define pw_comment    pw_gecos
  3307.   
  3308.   __EXTERN struct passwd *getpwent __PROTO((void));
  3309. - __EXTERN struct passwd *getpwuid __PROTO((uid_t));
  3310.   __EXTERN struct passwd *getpwnam __PROTO((const char *));
  3311.   
  3312.   #ifndef _POSIX_SOURCE
  3313.   __EXTERN void        setpwfile __PROTO((char *));
  3314. ! __EXTERN int        setpwent  __PROTO((void));
  3315. ! __EXTERN int        endpwent  __PROTO((void));
  3316.   #endif
  3317.   
  3318. ! #if defined(__cplusplus)
  3319.   }
  3320.   #endif
  3321.   
  3322. --- 27,42 ----
  3323.   #define pw_comment    pw_gecos
  3324.   
  3325.   __EXTERN struct passwd *getpwent __PROTO((void));
  3326.   __EXTERN struct passwd *getpwnam __PROTO((const char *));
  3327.   
  3328.   #ifndef _POSIX_SOURCE
  3329.   __EXTERN void        setpwfile __PROTO((char *));
  3330. ! __EXTERN struct passwd *getpwuid __PROTO((int));
  3331. ! __EXTERN void        setpwent  __PROTO((void));
  3332. ! __EXTERN void        endpwent  __PROTO((void));
  3333.   #endif
  3334.   
  3335. ! #ifdef __cplusplus
  3336.   }
  3337.   #endif
  3338.   
  3339. *** 1.4    1991/06/20 02:21:30
  3340. --- regexp.h    1992/06/03 15:27:03
  3341. ***************
  3342. *** 7,13 ****
  3343.   #include <compiler.h>
  3344.   #endif
  3345.   
  3346. ! #if defined(__cplusplus)
  3347.   extern "C" {
  3348.   #endif
  3349.   
  3350. --- 7,13 ----
  3351.   #include <compiler.h>
  3352.   #endif
  3353.   
  3354. ! #ifdef __cplusplus
  3355.   extern "C" {
  3356.   #endif
  3357.   
  3358. ***************
  3359. *** 30,36 ****
  3360.   __EXTERN void regerror    __PROTO((char *_message));
  3361.   __EXTERN void regdump __PROTO((regexp *r));
  3362.   
  3363. ! #if defined(__cplusplus)
  3364.   }
  3365.   #endif
  3366.   
  3367. --- 30,36 ----
  3368.   __EXTERN void regerror    __PROTO((char *_message));
  3369.   __EXTERN void regdump __PROTO((regexp *r));
  3370.   
  3371. ! #ifdef __cplusplus
  3372.   }
  3373.   #endif
  3374.   
  3375. *** 1.5    1991/06/20 02:21:30
  3376. --- resource.h    1992/06/03 15:27:04
  3377. ***************
  3378. *** 1,13 ****
  3379.   #ifndef _RESOURCE_H
  3380.   #define _RESOURCE_H
  3381.   
  3382. ! #ifdef __MINT__
  3383.   
  3384. ! #if defined(__cplusplus)
  3385.   extern "C" {
  3386.   #endif
  3387.   
  3388.   #define RLIM_INFINITY    0x7fffffffL
  3389.   
  3390.   #define RLIMIT_CPU    1        /* max cpu time allowed */
  3391. --- 1,14 ----
  3392.   #ifndef _RESOURCE_H
  3393.   #define _RESOURCE_H
  3394.   
  3395. ! #ifndef _COMPILER_H
  3396. ! #include <compiler.h>
  3397. ! #endif
  3398.   
  3399. ! #ifdef __cplusplus
  3400.   extern "C" {
  3401.   #endif
  3402.   
  3403.   #define RLIM_INFINITY    0x7fffffffL
  3404.   
  3405.   #define RLIMIT_CPU    1        /* max cpu time allowed */
  3406. ***************
  3407. *** 33,38 ****
  3408. --- 34,40 ----
  3409.   
  3410.   struct rlimit {
  3411.       long rlim_cur;
  3412. +     long rlim_max;
  3413.   };
  3414.   
  3415.   __EXTERN int    setrlimit    __PROTO((int mode, struct rlimit *rl));
  3416. ***************
  3417. *** 39,47 ****
  3418.   __EXTERN int    getrlimit    __PROTO((int mode, struct rlimit *rl));
  3419.   __EXTERN int    getrusuage    __PROTO((int which, struct rusage *r));
  3420.   
  3421. ! #if defined(__cplusplus)
  3422.   }
  3423.   #endif
  3424.   
  3425. - #endif /* __MINT__ */
  3426.   #endif /* _RESOURCE_H */
  3427. --- 41,48 ----
  3428.   __EXTERN int    getrlimit    __PROTO((int mode, struct rlimit *rl));
  3429.   __EXTERN int    getrusuage    __PROTO((int which, struct rusage *r));
  3430.   
  3431. ! #ifdef __cplusplus
  3432.   }
  3433.   #endif
  3434.   
  3435.   #endif /* _RESOURCE_H */
  3436. *** 1.3    1991/06/20 02:21:30
  3437. --- screen.h    1992/06/03 15:27:04
  3438. ***************
  3439. *** 1,7 ****
  3440.   #ifndef _SCREEN_H
  3441.   #define _SCREEN_H
  3442.   
  3443. ! #if defined(__cplusplus)
  3444.   extern "C" {
  3445.   #endif
  3446.   
  3447. --- 1,7 ----
  3448.   #ifndef _SCREEN_H
  3449.   #define _SCREEN_H
  3450.   
  3451. ! #ifdef __cplusplus
  3452.   extern "C" {
  3453.   #endif
  3454.   
  3455. ***************
  3456. *** 63,69 ****
  3457.   #define SCRGETCOLOR    (('S'<<8) | 3)
  3458.   #define SCRSETCOLOR    (('S'<<8) | 4)
  3459.   
  3460. ! #if defined(__cplusplus)
  3461.   }
  3462.   #endif
  3463.   
  3464. --- 63,69 ----
  3465.   #define SCRGETCOLOR    (('S'<<8) | 3)
  3466.   #define SCRSETCOLOR    (('S'<<8) | 4)
  3467.   
  3468. ! #ifdef __cplusplus
  3469.   }
  3470.   #endif
  3471.   
  3472. *** 1.12    1991/06/23 17:12:30
  3473. --- setjmp.h    1992/06/03 15:27:04
  3474. ***************
  3475. *** 5,25 ****
  3476.   #include <compiler.h>
  3477.   #endif
  3478.   
  3479. ! #if defined(__cplusplus)
  3480.   extern "C" {
  3481.   #endif
  3482.   
  3483. - /* added one long for saving bios_stk (needed by SIGALRM) */
  3484.   typedef char * jmp_buf[14];
  3485.   
  3486. ! __EXTERN int setjmp __PROTO((jmp_buf));
  3487. ! __EXTERN void longjmp __PROTO((jmp_buf, int));
  3488. ! #if !(defined(__MINT__) || defined(__cplusplus))
  3489.   __EXTERN int catch __PROTO((jmp_buf id, int (*fn )(void )));
  3490.   __EXTERN void throw __PROTO((jmp_buf id, int rv));
  3491.   #endif
  3492.   
  3493. ! #if defined(__cplusplus)
  3494.   }
  3495.   #endif
  3496.   
  3497. --- 5,27 ----
  3498.   #include <compiler.h>
  3499.   #endif
  3500.   
  3501. ! #ifdef __cplusplus
  3502.   extern "C" {
  3503.   #endif
  3504.   
  3505.   typedef char * jmp_buf[14];
  3506.   
  3507. ! __EXTERN int    setjmp    __PROTO((jmp_buf));
  3508. ! __EXTERN void    longjmp    __PROTO((jmp_buf, int));
  3509. ! #ifndef __MINT__
  3510. ! # ifndef __cplusplus
  3511.   __EXTERN int catch __PROTO((jmp_buf id, int (*fn )(void )));
  3512.   __EXTERN void throw __PROTO((jmp_buf id, int rv));
  3513. + # endif
  3514.   #endif
  3515.   
  3516. ! #ifdef __cplusplus
  3517.   }
  3518.   #endif
  3519.   
  3520. *** 1.5    1991/06/20 02:21:30
  3521. --- siglist.h    1992/06/03 15:27:04
  3522. ***************
  3523. *** 1,14 ****
  3524.   #ifndef _SIGLIST_H
  3525.   #define _SIGLIST_H
  3526.   
  3527. ! #if defined(__cplusplus)
  3528.   extern "C" {
  3529.   #endif
  3530.   
  3531.   extern char *sys_siglist[];
  3532.   extern char *signal_names[];
  3533.   
  3534. ! #if defined(__cplusplus)
  3535.   }
  3536.   #endif
  3537.   
  3538. --- 1,16 ----
  3539.   #ifndef _SIGLIST_H
  3540.   #define _SIGLIST_H
  3541.   
  3542. ! #ifdef __cplusplus
  3543.   extern "C" {
  3544.   #endif
  3545.   
  3546.   extern char *sys_siglist[];
  3547. + #ifndef __MINT__
  3548.   extern char *signal_names[];
  3549. + #endif
  3550.   
  3551. ! #ifdef __cplusplus
  3552.   }
  3553.   #endif
  3554.   
  3555. *** 1.16    1992/04/13 15:53:11
  3556. --- signal.h    1992/06/03 15:27:05
  3557. ***************
  3558. *** 1,6 ****
  3559.   #ifndef _SIGNAL_H
  3560.   #define _SIGNAL_H
  3561. ! #if defined(__cplusplus)
  3562.   extern "C" {
  3563.   #endif
  3564.   
  3565. --- 1,11 ----
  3566.   #ifndef _SIGNAL_H
  3567.   #define _SIGNAL_H
  3568. ! #ifndef _COMPILER_H
  3569. ! #include <compiler.h>
  3570. ! #endif
  3571. ! #ifdef __cplusplus
  3572.   extern "C" {
  3573.   #endif
  3574.   
  3575. ***************
  3576. *** 42,51 ****
  3577.   #define SIGUSR1        29        /* user signal 1 */
  3578.   #define SIGUSR2        30        /* user signal 2 */
  3579.   
  3580. - #ifndef _COMPILER_H
  3581. - #include <compiler.h>
  3582. - #endif
  3583.   typedef void (*__Sigfunc) __PROTO((int signum));
  3584.   typedef short sig_atomic_t;
  3585.   
  3586. --- 47,52 ----
  3587. ***************
  3588. *** 56,71 ****
  3589.   __EXTERN __Sigfunc    signal    __PROTO((int sig, __Sigfunc func));
  3590.   __EXTERN int        raise    __PROTO((int sig));
  3591.   
  3592. ! #if !defined(__STRICT_ANSI__) && defined(__MINT__)
  3593.   __EXTERN long    sigsetmask    __PROTO((long mask));
  3594.   __EXTERN long    sigblock    __PROTO((long mask));
  3595.   
  3596.   /* a mask for signals */
  3597.   #define sigmask(sig) (1L << (sig))
  3598. ! #endif
  3599.   
  3600. ! #if defined(__cplusplus)
  3601.   }
  3602.   #endif
  3603.   
  3604. --- 57,73 ----
  3605.   __EXTERN __Sigfunc    signal    __PROTO((int sig, __Sigfunc func));
  3606.   __EXTERN int        raise    __PROTO((int sig));
  3607.   
  3608. ! #ifdef __MINT__
  3609. ! # ifndef __STRICT_ANSI__
  3610.   __EXTERN long    sigsetmask    __PROTO((long mask));
  3611.   __EXTERN long    sigblock    __PROTO((long mask));
  3612.   
  3613.   /* a mask for signals */
  3614.   #define sigmask(sig) (1L << (sig))
  3615. ! # endif
  3616. ! #endif /* __MINT__ */
  3617.   
  3618. ! #ifdef __cplusplus
  3619.   }
  3620.   #endif
  3621.   
  3622. *** 1.6    1991/06/20 02:21:30
  3623. --- st-out.h    1992/06/03 15:27:05
  3624. ***************
  3625. *** 5,11 ****
  3626.   #ifndef _STAOUT_H
  3627.   #define _STAOUT_H
  3628.   
  3629. ! #if defined(__cplusplus)
  3630.   extern "C" {
  3631.   #endif
  3632.   
  3633. --- 5,11 ----
  3634.   #ifndef _STAOUT_H
  3635.   #define _STAOUT_H
  3636.   
  3637. ! #ifdef __cplusplus
  3638.   extern "C" {
  3639.   #endif
  3640.   
  3641. ***************
  3642. *** 60,66 ****
  3643.   #define A_DEF    0x8000        /* defined */
  3644.   #define A_LNAM  0x0048        /* gst compat long name */
  3645.   
  3646. ! #if defined(__cplusplus)
  3647.   }
  3648.   #endif
  3649.   
  3650. --- 60,66 ----
  3651.   #define A_DEF    0x8000        /* defined */
  3652.   #define A_LNAM  0x0048        /* gst compat long name */
  3653.   
  3654. ! #ifdef __cplusplus
  3655.   }
  3656.   #endif
  3657.   
  3658. *** 1.5    1991/06/20 02:21:30
  3659. --- stab.h    1992/06/03 15:27:05
  3660. ***************
  3661. *** 1,7 ****
  3662.   #ifndef __GNU_STAB__
  3663.   #define __GNU_STAB__
  3664.   
  3665. ! #if defined(__cplusplus)
  3666.   extern "C" {
  3667.   #endif
  3668.   
  3669. --- 1,7 ----
  3670.   #ifndef __GNU_STAB__
  3671.   #define __GNU_STAB__
  3672.   
  3673. ! #ifdef __cplusplus
  3674.   extern "C" {
  3675.   #endif
  3676.   
  3677. ***************
  3678. *** 15,21 ****
  3679.   
  3680.   #undef __define_stab
  3681.   
  3682. ! #if defined(__cplusplus)
  3683.   }
  3684.   #endif
  3685.   
  3686. --- 15,21 ----
  3687.   
  3688.   #undef __define_stab
  3689.   
  3690. ! #ifdef __cplusplus
  3691.   }
  3692.   #endif
  3693.   
  3694. *** 1.13    1991/06/20 02:21:30
  3695. --- stat.h    1992/06/03 15:27:05
  3696. ***************
  3697. *** 9,26 ****
  3698.   #include <types.h>
  3699.   #endif
  3700.   
  3701. ! #if defined(__cplusplus)
  3702.   extern "C" {
  3703.   #endif
  3704.   
  3705.   struct stat {
  3706.       u_short    st_mode;
  3707. !     ino_t    st_ino;
  3708. !     dev_t    st_dev;
  3709. !     short    st_rdev;
  3710.       short    st_nlink;
  3711. !     uid_t    st_uid;
  3712. !     gid_t    st_gid;
  3713.       off_t    st_size;
  3714.       off_t    st_blksize;
  3715.       off_t    st_blocks;
  3716. --- 9,26 ----
  3717.   #include <types.h>
  3718.   #endif
  3719.   
  3720. ! #ifdef __cplusplus
  3721.   extern "C" {
  3722.   #endif
  3723.   
  3724.   struct stat {
  3725.       u_short    st_mode;
  3726. !     ino_t    st_ino;        /* must be 32 bits */
  3727. !     dev_t    st_dev;        /* must be 16 bits */
  3728. !     short    st_rdev;    /* not supported by the kernel */
  3729.       short    st_nlink;
  3730. !     uid_t    st_uid;        /* must be 16 bits */
  3731. !     gid_t    st_gid;        /* must be 16 bits */
  3732.       off_t    st_size;
  3733.       off_t    st_blksize;
  3734.       off_t    st_blocks;
  3735. ***************
  3736. *** 28,49 ****
  3737.       time_t    st_atime;
  3738.       time_t    st_ctime;
  3739.       short    st_attr;
  3740.   };
  3741.   
  3742.   #define    S_IFMT            0170000
  3743. - #define S_IFBLK            0060000
  3744.   #define    S_IFCHR            0020000
  3745.   #define    S_IFDIR            0040000
  3746.   #define    S_IFREG            0100000
  3747.   #define S_IFIFO            0120000
  3748.   #define    S_IFLNK            0160000
  3749.   
  3750. ! #define    S_ISUID            0004000
  3751. ! #define    S_ISGID            0002000
  3752. ! #define    S_ISVTX            0001000
  3753. ! #define    S_IREAD            0000400
  3754. ! #define    S_IWRITE        0000200
  3755. ! #define    S_IEXEC            0000100
  3756.   
  3757.   /* function definitions */
  3758.   __EXTERN int  stat    __PROTO((const char *, struct stat *));
  3759. --- 28,68 ----
  3760.       time_t    st_atime;
  3761.       time_t    st_ctime;
  3762.       short    st_attr;
  3763. + #ifdef __MINT__
  3764. +     short    res1;        /* reserved for future kernel use */
  3765. +     long    res2[2];
  3766. + #endif
  3767.   };
  3768.   
  3769.   #define    S_IFMT            0170000
  3770.   #define    S_IFCHR            0020000
  3771.   #define    S_IFDIR            0040000
  3772. + #define S_IFBLK            0060000
  3773.   #define    S_IFREG            0100000
  3774.   #define S_IFIFO            0120000
  3775. + #define S_IMEM            0140000
  3776.   #define    S_IFLNK            0160000
  3777.   
  3778. ! #define    S_ISUID            04000
  3779. ! #define    S_ISGID            02000
  3780. ! #define    S_ISVTX            01000
  3781. ! /* file access modes for user, group, and other*/
  3782. ! #define S_IRUSR            0400
  3783. ! #define S_IWUSR            0200
  3784. ! #define S_IXUSR            0100
  3785. ! #define S_IRGRP            0040
  3786. ! #define S_IWGRP            0020
  3787. ! #define S_IXGRP            0010
  3788. ! #define S_IROTH            0004
  3789. ! #define S_IWOTH            0002
  3790. ! #define S_IXOTH            0001
  3791. ! #ifndef _POSIX_SOURCE
  3792. ! #define    S_IREAD            S_IRUSR
  3793. ! #define    S_IWRITE        S_IWUSR
  3794. ! #define    S_IEXEC            S_IXUSR
  3795. ! #define DEV_BSIZE        1024
  3796. ! #endif
  3797.   
  3798.   /* function definitions */
  3799.   __EXTERN int  stat    __PROTO((const char *, struct stat *));
  3800. ***************
  3801. *** 52,58 ****
  3802.   __EXTERN int  lstat    __PROTO((const char *, struct stat *));
  3803.   #endif
  3804.   
  3805. ! #if defined(__cplusplus)
  3806.   }
  3807.   #endif
  3808.   
  3809. --- 71,77 ----
  3810.   __EXTERN int  lstat    __PROTO((const char *, struct stat *));
  3811.   #endif
  3812.   
  3813. ! #ifdef __cplusplus
  3814.   }
  3815.   #endif
  3816.   
  3817. *** 1.6    1991/06/20 02:21:30
  3818. --- stdarg.h    1992/06/03 15:27:06
  3819. ***************
  3820. *** 31,44 ****
  3821.   #define va_start(AP, LASTARG)                         \
  3822.    (AP = ((char *) &(LASTARG) + __va_rounded_size (LASTARG)))
  3823.   
  3824. - #if defined(__cplusplus)
  3825. - extern "C" {
  3826. - #endif
  3827. - void va_end (va_list);        /* Defined in gnulib -- not needed */
  3828. - #if defined(__cplusplus)
  3829. - }
  3830. - #endif
  3831.   #define va_end(AP)
  3832.   
  3833.   #define va_arg(AP, TYPE)                        \
  3834. --- 31,36 ----
  3835. *** 1.14    1992/04/13 15:53:11
  3836. --- stddef.h    1992/06/03 15:27:06
  3837. ***************
  3838. *** 10,16 ****
  3839.   #include <compiler.h>
  3840.   #endif
  3841.   
  3842. ! #if defined(__cplusplus)
  3843.   extern "C" {
  3844.   #endif
  3845.   
  3846. --- 10,16 ----
  3847.   #include <compiler.h>
  3848.   #endif
  3849.   
  3850. ! #ifdef __cplusplus
  3851.   extern "C" {
  3852.   #endif
  3853.   
  3854. ***************
  3855. *** 35,41 ****
  3856.   #endif
  3857.   
  3858.   /* Offset of member MEMBER in a struct of type TYPE.  */
  3859. ! #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0L)->MEMBER)
  3860.   
  3861.   #ifndef EXIT_FAILURE
  3862.   #define    EXIT_FAILURE    (1)        /* failure return value for exit() */
  3863. --- 35,41 ----
  3864.   #endif
  3865.   
  3866.   /* Offset of member MEMBER in a struct of type TYPE.  */
  3867. ! #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
  3868.   
  3869.   #ifndef EXIT_FAILURE
  3870.   #define    EXIT_FAILURE    (1)        /* failure return value for exit() */
  3871. ***************
  3872. *** 42,48 ****
  3873.   #define    EXIT_SUCCESS    (0)        /* success return value for exit() */
  3874.   #endif
  3875.   
  3876. ! #if defined(__cplusplus)
  3877.   }
  3878.   #endif
  3879.   
  3880. --- 42,48 ----
  3881.   #define    EXIT_SUCCESS    (0)        /* success return value for exit() */
  3882.   #endif
  3883.   
  3884. ! #ifdef __cplusplus
  3885.   }
  3886.   #endif
  3887.   
  3888. *** 1.22    1992/04/13 15:53:11
  3889. --- stdio.h    1992/06/03 15:27:06
  3890. ***************
  3891. *** 11,16 ****
  3892. --- 11,20 ----
  3893.   #include <compiler.h>
  3894.   #endif
  3895.   
  3896. + #ifdef __cplusplus
  3897. + extern "C" {
  3898. + #endif
  3899.   #ifndef _SIZE_T
  3900.   #define _SIZE_T __SIZE_TYPEDEF__
  3901.   typedef _SIZE_T size_t;
  3902. ***************
  3903. *** 25,31 ****
  3904.   #define    FILENAME_MAX    (128)        /* maximum filename size */
  3905.   
  3906.   #ifndef NULL
  3907. ! #define NULL        ((void *)0L)
  3908.   #endif
  3909.   
  3910.   #define    BUFSIZ        ((size_t)1024)    /* default buffer size */
  3911. --- 29,35 ----
  3912.   #define    FILENAME_MAX    (128)        /* maximum filename size */
  3913.   
  3914.   #ifndef NULL
  3915. ! #define NULL        __NULL
  3916.   #endif
  3917.   
  3918.   #define    BUFSIZ        ((size_t)1024)    /* default buffer size */
  3919. ***************
  3920. *** 90,166 ****
  3921.   #define ferror(fp)    ((fp)->_flag & _IOERR)
  3922.   #define fileno(fp)    ((fp)->_file)
  3923.   
  3924. - __EXTERN int remove __PROTO((const char *filename));
  3925. - __EXTERN int rename __PROTO((const char *_oldname, const char *_newname));
  3926. - __EXTERN FILE *tmpfile __PROTO((void));
  3927. - __EXTERN char *tmpnam __PROTO((char *buf));
  3928. - __EXTERN int fclose __PROTO((FILE *fp));
  3929. - __EXTERN int fflush __PROTO((FILE *fp));
  3930.   
  3931. ! __EXTERN FILE *fopen __PROTO((const char *filename, const char *mode));
  3932. ! __EXTERN FILE *freopen __PROTO((const char *filename, const char *mode, FILE *fp));
  3933.   
  3934. ! __EXTERN void setbuf __PROTO((FILE *fp, char *buf));
  3935. ! __EXTERN int setvbuf __PROTO((FILE *fp, char *bp, int bmode, size_t size));
  3936. ! __EXTERN int fprintf __PROTO((FILE *fp, const char *fmt, ...));
  3937. ! __EXTERN int printf __PROTO((const char *fmt, ...));
  3938. ! __EXTERN int sprintf __PROTO((char *buf, const char *fmt, ...));
  3939.   
  3940. ! __EXTERN int fscanf __PROTO((FILE *fp, const char *fmt, ...));
  3941. ! __EXTERN int scanf __PROTO((const char *fmt, ...));
  3942. ! __EXTERN int sscanf __PROTO((const char *buf, const char *fmt, ...));
  3943.   
  3944.   __EXTERN int     vfprintf __PROTO((FILE *, const char *, __VA_LIST__));
  3945.   __EXTERN int     vprintf     __PROTO((const char *, __VA_LIST__));
  3946.   __EXTERN int     vsprintf __PROTO((char *, const char *, __VA_LIST__));
  3947.   
  3948. ! __EXTERN int     vfscanf __PROTO((FILE *, const char *, __VA_LIST__));
  3949. ! __EXTERN int     vscanf  __PROTO((const char *, __VA_LIST__));
  3950. ! __EXTERN int     vsscanf __PROTO((const char *, const char *, __VA_LIST__));
  3951. ! __EXTERN int fgetc __PROTO((FILE *fp));
  3952. ! __EXTERN char *fgets __PROTO((char *data, int limit, FILE *fp));
  3953. ! __EXTERN char *gets __PROTO((char *data));
  3954. ! __EXTERN int fputc __PROTO((int c, FILE *fp));
  3955. ! __EXTERN int fputs __PROTO((const char *data, FILE *fp));
  3956. ! __EXTERN int puts __PROTO((const char *data));
  3957. ! __EXTERN int fungetc __PROTO((int c, FILE *fp));
  3958. ! __EXTERN size_t fread __PROTO((void *data, size_t size, size_t count, FILE *fp));
  3959. ! __EXTERN size_t fwrite __PROTO((const void *data, size_t size, size_t count, FILE *fp));
  3960. ! __EXTERN int fgetpos __PROTO((FILE *fp, fpos_t *pos));
  3961. ! __EXTERN int fsetpos __PROTO((FILE *fp, fpos_t *pos));
  3962. ! __EXTERN long ftell __PROTO((FILE *fp));
  3963. ! __EXTERN void rewind __PROTO((FILE *fp));
  3964. ! __EXTERN int fseek __PROTO((FILE *fp, long offset, int origin));
  3965.   
  3966. ! __EXTERN void perror __PROTO((const char *msg));
  3967.   
  3968.   #ifndef __STRICT_ANSI__
  3969. ! __EXTERN FILE *fdopen __PROTO((int h, const char *mode));
  3970. ! __EXTERN FILE *popen __PROTO((const char *command, const char *type));
  3971. ! __EXTERN int pclose __PROTO((FILE *fp));
  3972. ! # ifndef _POSIX_SOURCE
  3973. ! __EXTERN void _binmode __PROTO((int force));
  3974. ! __EXTERN long getl __PROTO((FILE *fp));
  3975. ! __EXTERN long putl __PROTO((long n, FILE *fp));
  3976.   
  3977. ! __EXTERN short getw __PROTO((FILE *fp));
  3978. ! __EXTERN short putw __PROTO((short n, FILE *fp));
  3979.   # endif
  3980.   #endif /* __STRICT_ANSI__ */
  3981.   
  3982.   /* aliases */
  3983.   
  3984.   __EXTERN int    _filbuf    __PROTO((FILE *));    /* needed for getc */
  3985.   
  3986. ! #if defined(__GNUC__) && !defined(__NO_INLINE__)
  3987.   #define getc(__fp) \
  3988.   ({   int __c; \
  3989.        typedef _tfp = (__fp); \
  3990. --- 94,175 ----
  3991.   #define ferror(fp)    ((fp)->_flag & _IOERR)
  3992.   #define fileno(fp)    ((fp)->_file)
  3993.   
  3994.   
  3995. ! /* function definitions */
  3996.   
  3997. ! __EXTERN int    remove    __PROTO((const char *));
  3998. ! __EXTERN int    rename    __PROTO((const char *, const char *));
  3999. ! __EXTERN char *    tmpnam    __PROTO((char *));
  4000. ! __EXTERN FILE *    tmpfile    __PROTO((void));
  4001. ! __EXTERN int    fclose    __PROTO((FILE *));
  4002. ! __EXTERN int    fflush    __PROTO((FILE *));
  4003. ! __EXTERN FILE *    fopen    __PROTO((const char *, const char *));
  4004. ! __EXTERN FILE *    freopen    __PROTO((const char *, const char *, FILE *));
  4005. ! __EXTERN void    setbuf    __PROTO((FILE *, char *));
  4006. ! __EXTERN int    setvbuf    __PROTO((FILE *, char *, int, size_t));
  4007. ! #ifdef __SRC__
  4008. ! __EXTERN int  fscanf  __PROTO((FILE *, const char *, char *));
  4009. ! __EXTERN int  scanf   __PROTO((const char *, char *));
  4010. ! __EXTERN int  sscanf  __PROTO((const char *, const char *, int));
  4011. ! #else
  4012. ! __EXTERN int  fscanf  __PROTO((FILE *, const char *, ...));
  4013. ! __EXTERN int  scanf   __PROTO((const char *, ...));
  4014. ! __EXTERN int  sscanf  __PROTO((const char *, const char *, ...));
  4015. ! #endif
  4016.   
  4017. ! __EXTERN int    fprintf    __PROTO((FILE *, const char *, ...));
  4018. ! __EXTERN int    printf    __PROTO((const char *, ...));
  4019. ! __EXTERN int    sprintf    __PROTO((char *, const char *, ...));
  4020.   
  4021.   __EXTERN int     vfprintf __PROTO((FILE *, const char *, __VA_LIST__));
  4022.   __EXTERN int     vprintf     __PROTO((const char *, __VA_LIST__));
  4023.   __EXTERN int     vsprintf __PROTO((char *, const char *, __VA_LIST__));
  4024.   
  4025. ! __EXTERN int    fgetc    __PROTO((FILE *));
  4026. ! __EXTERN char    *fgets    __PROTO((char *, int, FILE *));
  4027. ! __EXTERN char    *gets    __PROTO((char *));
  4028. ! __EXTERN int    fputc    __PROTO((int c, FILE *));
  4029. ! __EXTERN int    fputs    __PROTO((const char *, FILE *));
  4030. ! __EXTERN int    puts    __PROTO((const char *));
  4031. ! __EXTERN int     fungetc    __PROTO((int, FILE *));
  4032. ! __EXTERN size_t    fread    __PROTO((void *, size_t, size_t, FILE *));
  4033. ! __EXTERN size_t    fwrite    __PROTO((const void *, size_t, size_t, FILE *));
  4034. ! __EXTERN int    fgetpos    __PROTO((FILE *, fpos_t *));
  4035. ! __EXTERN int    fsetpos    __PROTO((FILE *, fpos_t *));
  4036. ! __EXTERN int    fseek    __PROTO((FILE *, long, int));
  4037. ! __EXTERN long    ftell    __PROTO((FILE *));
  4038. ! __EXTERN void    rewind    __PROTO((FILE *));
  4039.   
  4040. ! __EXTERN void    perror    __PROTO((const char *));
  4041.   
  4042.   #ifndef __STRICT_ANSI__
  4043. ! __EXTERN FILE    *fdopen    __PROTO((int, const char *));
  4044. ! __EXTERN FILE    *popen    __PROTO((const char *, const char *));
  4045. ! __EXTERN int    pclose    __PROTO((FILE *));
  4046.   
  4047. ! # ifndef _POSIX_SOURCE
  4048. ! __EXTERN void    _binmode    __PROTO((int));        /* ++jrb */
  4049. ! __EXTERN long     getl    __PROTO((FILE *));
  4050. ! __EXTERN long     putl    __PROTO((long, FILE *));
  4051. ! __EXTERN short     getw    __PROTO((FILE *));
  4052. ! __EXTERN short     putw    __PROTO((short, FILE *));
  4053.   # endif
  4054.   #endif /* __STRICT_ANSI__ */
  4055.   
  4056.   /* aliases */
  4057.   
  4058.   __EXTERN int    _filbuf    __PROTO((FILE *));    /* needed for getc */
  4059.   
  4060. ! #ifdef __GNUC_INLINE__
  4061.   #define getc(__fp) \
  4062.   ({   int __c; \
  4063.        typedef _tfp = (__fp); \
  4064. ***************
  4065. *** 179,183 ****
  4066. --- 188,196 ----
  4067.   #define    getchar()        getc(stdin)
  4068.   #define    ungetchar(c)        fungetc((c),stdin)
  4069.   #define    putchar(c)        fputc((c),stdout)
  4070. + #ifdef __cplusplus
  4071. + }
  4072. + #endif
  4073.   
  4074.   #endif /* _STDIO_H */
  4075. *** 1.18    1992/03/22 22:05:23
  4076. --- stdlib.h    1992/06/03 15:27:07
  4077. ***************
  4078. *** 9,15 ****
  4079.   #include <compiler.h>
  4080.   #endif
  4081.   
  4082. ! #if defined(__cplusplus)
  4083.   extern "C" {
  4084.   #endif
  4085.   
  4086. --- 9,15 ----
  4087.   #include <compiler.h>
  4088.   #endif
  4089.   
  4090. ! #ifdef __cplusplus
  4091.   extern "C" {
  4092.   #endif
  4093.   
  4094. ***************
  4095. *** 92,98 ****
  4096.   __EXTERN div_t div __PROTO((int num, int denom));
  4097.   __EXTERN ldiv_t ldiv __PROTO((long num, long denom));
  4098.   
  4099. ! #if defined(__cplusplus)
  4100.   }
  4101.   #endif
  4102.   
  4103. --- 92,98 ----
  4104.   __EXTERN div_t div __PROTO((int num, int denom));
  4105.   __EXTERN ldiv_t ldiv __PROTO((long num, long denom));
  4106.   
  4107. ! #ifdef __cplusplus
  4108.   }
  4109.   #endif
  4110.   
  4111. *** 1.20    1992/04/13 15:53:11
  4112. --- string.h    1992/06/03 15:27:07
  4113. ***************
  4114. *** 8,14 ****
  4115.   #include <compiler.h>
  4116.   #endif
  4117.   
  4118. ! #if defined(__cplusplus)
  4119.   extern "C" {
  4120.   #endif
  4121.   
  4122. --- 8,14 ----
  4123.   #include <compiler.h>
  4124.   #endif
  4125.   
  4126. ! #ifdef __cplusplus
  4127.   extern "C" {
  4128.   #endif
  4129.   
  4130. ***************
  4131. *** 67,85 ****
  4132.   __EXTERN void bcopy __PROTO((const void *src, void *dst, size_t length));
  4133.   __EXTERN int bcmp __PROTO((const void *src, const void *dst, size_t n));
  4134.   __EXTERN void bzero __PROTO((void *b, size_t n));
  4135. - #ifdef __MSHORT__
  4136. - __EXTERN void lbcopy __PROTO((const void *src, void *dst, size_t length));
  4137. - __EXTERN int  lbcmp __PROTO((const void *s1, const void *s2, size_t length));
  4138. - __EXTERN void lbzero __PROTO((void *dst, size_t length));
  4139. - #endif /* __MSHORT__ */
  4140. - #endif /* __STRICT_ANSI__ */
  4141.   
  4142. ! #ifndef __STRICT_ANSI__
  4143. ! #ifndef __MSHORT__
  4144. ! #define lbcopy    bcopy
  4145. ! #define lbcmp     bcmp
  4146. ! #define lbzero    bzero
  4147. ! #endif /* __MSHORT__ */
  4148.   #endif /* __STRICT_ANSI__ */
  4149.   
  4150.   /* some macro versions of functions. these are faster, but less
  4151. --- 67,77 ----
  4152.   __EXTERN void bcopy __PROTO((const void *src, void *dst, size_t length));
  4153.   __EXTERN int bcmp __PROTO((const void *src, const void *dst, size_t n));
  4154.   __EXTERN void bzero __PROTO((void *b, size_t n));
  4155.   
  4156. ! __EXTERN void _bcopy __PROTO((const void *src, void *dst, unsigned long length));
  4157. ! __EXTERN int  _bcmp __PROTO((const void *s1, const void *s2, unsigned long length));
  4158. ! __EXTERN void _bzero __PROTO((void *dst, unsigned long length));
  4159.   #endif /* __STRICT_ANSI__ */
  4160.   
  4161.   /* some macro versions of functions. these are faster, but less
  4162. ***************
  4163. *** 87,93 ****
  4164.      just #undef the appropriate things.
  4165.   */
  4166.   
  4167. ! #if defined(__GNUC__) && !defined(__NO_INLINE__) && !defined(__cplusplus)
  4168.   
  4169.   static __inline__
  4170.   char *
  4171. --- 79,86 ----
  4172.      just #undef the appropriate things.
  4173.   */
  4174.   
  4175. ! #ifdef __GNUC_INLINE__
  4176. ! # ifndef __cplusplus
  4177.   
  4178.   static __inline__
  4179.   char *
  4180. ***************
  4181. *** 122,130 ****
  4182.   #define strcpy     __strcpy
  4183.   #define strlen     __strlen
  4184.   
  4185. ! #endif /* __GNU__ && !__NO_INLINE__ &&!__cplusplus */
  4186.   
  4187. ! #if defined(__cplusplus)
  4188.   }
  4189.   #endif
  4190.   
  4191. --- 115,124 ----
  4192.   #define strcpy     __strcpy
  4193.   #define strlen     __strlen
  4194.   
  4195. ! # endif /* !__cplusplus */
  4196. ! #endif /* __GNUC_INLINE__ */
  4197.   
  4198. ! #ifdef __cplusplus
  4199.   }
  4200.   #endif
  4201.   
  4202. *** 1.12    1991/06/20 02:21:30
  4203. --- support.h    1992/06/03 15:27:07
  4204. ***************
  4205. *** 12,18 ****
  4206.   
  4207.   #include <time.h>    /* for time_t */
  4208.   
  4209. ! #if defined(__cplusplus)
  4210.   extern "C" {
  4211.   #endif
  4212.   
  4213. --- 12,18 ----
  4214.   
  4215.   #include <time.h>    /* for time_t */
  4216.   
  4217. ! #ifdef __cplusplus
  4218.   extern "C" {
  4219.   #endif
  4220.   
  4221. ***************
  4222. *** 72,78 ****
  4223.   __EXTERN int symlink __PROTO((char *old, char *new));
  4224.   __EXTERN int readlink __PROTO((char *filename, char *linkto, int siz));
  4225.   
  4226. ! #if defined(__cplusplus)
  4227.   }
  4228.   #endif
  4229.   
  4230. --- 72,78 ----
  4231.   __EXTERN int symlink __PROTO((char *old, char *new));
  4232.   __EXTERN int readlink __PROTO((char *filename, char *linkto, int siz));
  4233.   
  4234. ! #ifdef __cplusplus
  4235.   }
  4236.   #endif
  4237.   
  4238. *** 1.11    1992/04/06 20:12:56
  4239. --- sysvars.h    1992/06/03 15:27:07
  4240. ***************
  4241. *** 8,14 ****
  4242.   #ifndef _SYSVARS_H
  4243.   #define _SYSVARS_H
  4244.   
  4245. ! #if defined(__cplusplus)
  4246.   extern "C" {
  4247.   #endif
  4248.   
  4249. --- 8,18 ----
  4250.   #ifndef _SYSVARS_H
  4251.   #define _SYSVARS_H
  4252.   
  4253. ! #ifndef _COMPILER_H
  4254. ! #include <compiler.h>
  4255. ! #endif
  4256. ! #ifdef __cplusplus
  4257.   extern "C" {
  4258.   #endif
  4259.   
  4260. ***************
  4261. *** 99,105 ****
  4262.   {
  4263.       unsigned short    os_entry;        /* 0x00  BRA to reset handler    */
  4264.       unsigned short    os_version;      /* 0x02  TOS version        */
  4265. !     void        (*reseth)(void); /* 0x04 -> reset handler    */
  4266.       struct _osheader    *os_beg;     /* 0x08 -> base of OS        */
  4267.       void        *os_end;     /* 0x0c -> end of OS ram usage */
  4268.       char        *os_rsv1;     /* 0x10 reserved        */
  4269. --- 103,109 ----
  4270.   {
  4271.       unsigned short    os_entry;        /* 0x00  BRA to reset handler    */
  4272.       unsigned short    os_version;      /* 0x02  TOS version        */
  4273. !     void        (*reseth) __PROTO((void)); /* 0x04 -> reset handler    */
  4274.       struct _osheader    *os_beg;     /* 0x08 -> base of OS        */
  4275.       void        *os_end;     /* 0x0c -> end of OS ram usage */
  4276.       char        *os_rsv1;     /* 0x10 reserved        */
  4277. ***************
  4278. *** 116,130 ****
  4279.       
  4280.   /* zzzz to-do more */
  4281.   
  4282. - #ifndef _COMPILER_H
  4283. - #include <compiler.h>
  4284. - #endif
  4285.   __EXTERN long    get_sysvar        __PROTO((void *var));
  4286.   __EXTERN void    set_sysvar_to_long    __PROTO((void *var, long val));
  4287.   
  4288.   
  4289. ! #if defined(__cplusplus)
  4290.   }
  4291.   #endif
  4292.   
  4293. --- 120,130 ----
  4294.       
  4295.   /* zzzz to-do more */
  4296.   
  4297.   __EXTERN long    get_sysvar        __PROTO((void *var));
  4298.   __EXTERN void    set_sysvar_to_long    __PROTO((void *var, long val));
  4299.   
  4300.   
  4301. ! #ifdef __cplusplus
  4302.   }
  4303.   #endif
  4304.   
  4305. *** 1.5    1991/06/20 02:21:30
  4306. --- tchars.h    1992/06/03 15:27:08
  4307. ***************
  4308. *** 8,14 ****
  4309.   #ifndef _TCHARS_H
  4310.   #define _TCHARS_H
  4311.   
  4312. ! #if defined(__cplusplus)
  4313.   extern "C" {
  4314.   #endif
  4315.   
  4316. --- 8,14 ----
  4317.   #ifndef _TCHARS_H
  4318.   #define _TCHARS_H
  4319.   
  4320. ! #ifdef __cplusplus
  4321.   extern "C" {
  4322.   #endif
  4323.   
  4324. ***************
  4325. *** 46,52 ****
  4326.   extern    char    __tchars[];
  4327.   #endif
  4328.   
  4329. ! #if defined(__cplusplus)
  4330.   }
  4331.   #endif
  4332.   
  4333. --- 46,52 ----
  4334.   extern    char    __tchars[];
  4335.   #endif
  4336.   
  4337. ! #ifdef __cplusplus
  4338.   }
  4339.   #endif
  4340.   
  4341. *** 1.2    1991/06/20 02:22:10
  4342. --- termcap.h    1992/06/03 15:27:08
  4343. ***************
  4344. *** 5,11 ****
  4345.   #  include <compiler.h>
  4346.   #endif
  4347.   
  4348. ! #if defined(__cplusplus)
  4349.   extern "C" {
  4350.   #endif
  4351.   
  4352. --- 5,11 ----
  4353.   #  include <compiler.h>
  4354.   #endif
  4355.   
  4356. ! #ifdef __cplusplus
  4357.   extern "C" {
  4358.   #endif
  4359.   
  4360. ***************
  4361. *** 27,34 ****
  4362.   /* tputs.c */
  4363.   __EXTERN void tputs __PROTO((char *cp, int affcnt, int (*outc)(int )));
  4364.   
  4365. ! #if defined(__cplusplus)
  4366. ! }
  4367.   #endif
  4368.   
  4369.   #endif /* _TERMCAP_H */
  4370. --- 27,34 ----
  4371.   /* tputs.c */
  4372.   __EXTERN void tputs __PROTO((char *cp, int affcnt, int (*outc)(int )));
  4373.   
  4374. ! #ifdef __cplusplus
  4375. ! extern "C" {
  4376.   #endif
  4377.   
  4378.   #endif /* _TERMCAP_H */
  4379. *** 1.15    1991/12/26 16:23:20
  4380. --- time.h    1992/06/03 15:27:08
  4381. ***************
  4382. *** 10,16 ****
  4383.   #include <compiler.h>
  4384.   #endif
  4385.   
  4386. ! #if defined(__cplusplus)
  4387.   extern "C" {
  4388.   #endif
  4389.   
  4390. --- 10,16 ----
  4391.   #include <compiler.h>
  4392.   #endif
  4393.   
  4394. ! #ifdef __cplusplus
  4395.   extern "C" {
  4396.   #endif
  4397.   
  4398. ***************
  4399. *** 82,88 ****
  4400.        ((tva)->tv_sec == (tvb)->tv_sec && (tva)->tv_usec op (tvb)->tv_usec))
  4401.   #endif
  4402.   
  4403. ! #if defined(__cplusplus)
  4404.   }
  4405.   #endif
  4406.   
  4407. --- 82,88 ----
  4408.        ((tva)->tv_sec == (tvb)->tv_sec && (tva)->tv_usec op (tvb)->tv_usec))
  4409.   #endif
  4410.   
  4411. ! #ifdef __cplusplus
  4412.   }
  4413.   #endif
  4414.   
  4415. *** 1.10    1991/06/20 02:21:30
  4416. --- times.h    1992/06/03 15:27:08
  4417. ***************
  4418. *** 7,13 ****
  4419.   #include <compiler.h>
  4420.   #endif
  4421.   
  4422. ! #if defined(__cplusplus)
  4423.   extern "C" {
  4424.   #endif
  4425.   
  4426. --- 7,13 ----
  4427.   #include <compiler.h>
  4428.   #endif
  4429.   
  4430. ! #ifdef __cplusplus
  4431.   extern "C" {
  4432.   #endif
  4433.   
  4434. ***************
  4435. *** 26,32 ****
  4436.   
  4437.   __EXTERN int    times    __PROTO((struct tms *));
  4438.   
  4439. ! #if defined(__cplusplus)
  4440.   }
  4441.   #endif
  4442.   
  4443. --- 26,32 ----
  4444.   
  4445.   __EXTERN int    times    __PROTO((struct tms *));
  4446.   
  4447. ! #ifdef __cplusplus
  4448.   }
  4449.   #endif
  4450.   
  4451. *** 1.13    1991/12/26 16:23:20
  4452. --- types.h    1992/06/03 15:27:09
  4453. ***************
  4454. *** 5,11 ****
  4455.   #include <compiler.h>
  4456.   #endif
  4457.   
  4458. ! #if defined(__cplusplus)
  4459.   extern "C" {
  4460.   #endif
  4461.   
  4462. --- 5,11 ----
  4463.   #include <compiler.h>
  4464.   #endif
  4465.   
  4466. ! #ifdef __cplusplus
  4467.   extern "C" {
  4468.   #endif
  4469.   
  4470. ***************
  4471. *** 25,37 ****
  4472.   typedef unsigned short    u_short;
  4473.   typedef unsigned long    u_long;
  4474.   
  4475. ! typedef u_short        dev_t;        /* holds a device type */
  4476.   #define major(dev)    (((dev)&0xff00)>>8)
  4477.   #define minor(dev)    ((dev)&0x00ff)
  4478.   
  4479.   typedef u_long        ino_t;        /* holds an inode (fake under GEMDOS) */
  4480. ! typedef u_short        uid_t;        /* user id type */
  4481. ! typedef u_short        gid_t;        /* group id type */
  4482.   typedef void *        caddr_t;
  4483.   
  4484.   struct utimbuf {            /* type for times() call */
  4485. --- 25,38 ----
  4486.   typedef unsigned short    u_short;
  4487.   typedef unsigned long    u_long;
  4488.   
  4489. ! typedef unsigned short    dev_t;        /* holds a device type */
  4490.   #define major(dev)    (((dev)&0xff00)>>8)
  4491.   #define minor(dev)    ((dev)&0x00ff)
  4492.   
  4493.   typedef u_long        ino_t;        /* holds an inode (fake under GEMDOS) */
  4494. ! typedef _UID_T        uid_t;        /* user id type */
  4495. ! typedef _GID_T        gid_t;        /* group id type */
  4496. ! typedef _PID_T        pid_t;        /* process id type */
  4497.   typedef void *        caddr_t;
  4498.   
  4499.   struct utimbuf {            /* type for times() call */
  4500. ***************
  4501. *** 39,45 ****
  4502.       time_t    modtime;
  4503.   };
  4504.   
  4505. ! #if defined(__cplusplus)
  4506.   }
  4507.   #endif
  4508.   
  4509. --- 40,46 ----
  4510.       time_t    modtime;
  4511.   };
  4512.   
  4513. ! #ifdef __cplusplus
  4514.   }
  4515.   #endif
  4516.   
  4517. *** 1.10    1992/04/19 16:16:24
  4518. --- unistd.h    1992/06/03 15:27:09
  4519. ***************
  4520. *** 1,14 ****
  4521.   #ifndef _UNISTD_H
  4522.   #define _UNISTD_H
  4523.   
  4524. ! #include <time.h>
  4525. ! #include <types.h>
  4526.   #ifndef _COMPILER_H
  4527.   #include <compiler.h>
  4528.   #endif
  4529.   
  4530. ! #if defined(__cplusplus)
  4531.   extern "C" {
  4532.   #endif
  4533.   
  4534. --- 1,17 ----
  4535.   #ifndef _UNISTD_H
  4536.   #define _UNISTD_H
  4537.   
  4538. ! /* NOTE:
  4539. !  * in prototypes used here, do *not* use things
  4540. !  * like size_t, uid_t, etc., since these
  4541. !  * may not be defined. Use the macros
  4542. !  * from <compiler.h> instead.
  4543. !  */
  4544.   #ifndef _COMPILER_H
  4545.   #include <compiler.h>
  4546.   #endif
  4547.   
  4548. ! #ifdef __cplusplus
  4549.   extern "C" {
  4550.   #endif
  4551.   
  4552. ***************
  4553. *** 37,45 ****
  4554.   #if 0
  4555.   #define _POSIX_VERSION        0L        /* <- NON-CONFORMING */
  4556.   #endif
  4557. ! #define _POSIX_CHOWN_RESTRICTED  0        /* doesn't matter anyways */
  4558.   #define _POSIX_NO_TRUNC        -1
  4559. ! #define _POSIX_VDISABLE         0
  4560.   
  4561.   /* 1003.1 section 8.2.1.2 */
  4562.   #define STDIN_FILENO    0
  4563. --- 40,51 ----
  4564.   #if 0
  4565.   #define _POSIX_VERSION        0L        /* <- NON-CONFORMING */
  4566.   #endif
  4567. ! #define _POSIX_CHOWN_RESTRICTED 0
  4568. ! #define _POSIX_VDISABLE        0
  4569. ! #if 0                    /* this depends on the file system */
  4570.   #define _POSIX_NO_TRUNC        -1
  4571. ! #endif
  4572.   
  4573.   /* 1003.1 section 8.2.1.2 */
  4574.   #define STDIN_FILENO    0
  4575. ***************
  4576. *** 46,126 ****
  4577.   #define STDOUT_FILENO    1
  4578.   #define STDERR_FILENO    2
  4579.   
  4580.   #ifdef __MINT__
  4581. !   /* flock() commands */
  4582.   #  define F_ULOCK    0    /* unlock */
  4583.   #  define F_LOCK    1    /* lock */
  4584.   #  define F_TLOCK    2    /* test and lock (non-blocking) */
  4585.   #  define F_TEST    3    /* test */
  4586. !    __EXTERN int        lockf    __PROTO((int, int, long));
  4587.   #endif
  4588.   
  4589. ! __EXTERN __EXITING _exit __PROTO((int));
  4590. ! __EXTERN int access __PROTO((const char *, int));
  4591. ! __EXTERN int chdir __PROTO((const char *));
  4592. ! __EXTERN int chmod __PROTO((const char *, int));
  4593. ! __EXTERN int chown __PROTO((const char *, int, int));
  4594. ! __EXTERN int close __PROTO((int));
  4595. ! __EXTERN int creat __PROTO((const char *, unsigned));
  4596. ! __EXTERN int dup __PROTO((int));
  4597. ! __EXTERN int dup2 __PROTO((int, int));
  4598. ! __EXTERN int endpwent __PROTO((void));
  4599. ! __EXTERN char *getcwd __PROTO((char *, int));
  4600. ! __EXTERN char *getwd __PROTO((char *));
  4601. ! __EXTERN gid_t getegid __PROTO((void));
  4602. ! __EXTERN char *getenv __PROTO((const char *));
  4603. ! __EXTERN int putenv __PROTO((char *));
  4604. ! __EXTERN uid_t geteuid __PROTO((void));
  4605. ! __EXTERN gid_t getgid __PROTO((void));
  4606. ! __EXTERN char *getlogin __PROTO((void));
  4607. ! __EXTERN int getopt __PROTO((int, char * const *, const char *));
  4608. ! __EXTERN int getpgrp __PROTO((void));
  4609. ! __EXTERN int getppid __PROTO((void));
  4610. ! __EXTERN int getpid __PROTO((void));
  4611. ! __EXTERN uid_t getuid __PROTO((void));
  4612. ! __EXTERN int isatty __PROTO((int));
  4613. ! __EXTERN int kill __PROTO((int, int));
  4614. ! __EXTERN void *lsbrk __PROTO((long));
  4615. ! __EXTERN long lseek __PROTO((int, long, int));
  4616. ! __EXTERN int mkdir __PROTO((const char *, int));
  4617. ! __EXTERN char *mktemp __PROTO((char *));    /* be careful with this and Gcc,       */
  4618. !                 /* where strings are really constants  */
  4619. ! __EXTERN int open __PROTO((const char *, int, ...));
  4620. ! __EXTERN void psignal __PROTO((int, const char *));
  4621. ! __EXTERN int rmdir __PROTO((const char *));
  4622. ! __EXTERN void srandom __PROTO((unsigned int seed));
  4623. ! __EXTERN char *initstate __PROTO(( unsigned int seed, char *arg_state, int n ));
  4624. ! __EXTERN char *setstate __PROTO((char *arg_state));
  4625. ! __EXTERN long random __PROTO((void));
  4626. ! __EXTERN int read __PROTO((int, void *, unsigned int));
  4627. ! __EXTERN long _read __PROTO((int, void *, unsigned long));
  4628.   #define lread _read /* backwards compatibility, likely to go away */
  4629. - __EXTERN void *sbrk __PROTO((size_t));
  4630.   #ifndef __SRC__
  4631.   __EXTERN void setlinebuf __PROTO((void *)); /* avoid pulling in stdio here */
  4632.   #else
  4633.   __EXTERN void setlinebuf __PROTO((FILE *)); /* stdio included in src */
  4634.   #endif
  4635.   
  4636. ! __EXTERN gid_t setegid __PROTO((int));
  4637. ! __EXTERN gid_t setgid __PROTO((int));
  4638. ! __EXTERN int setpgrp __PROTO((void));
  4639.   __EXTERN int setpwent __PROTO((void));
  4640.   __EXTERN void setpwfile __PROTO((char *));
  4641. ! __EXTERN uid_t seteuid __PROTO((int));
  4642. ! __EXTERN uid_t setuid __PROTO((int));
  4643. ! __EXTERN void sleep __PROTO((unsigned int));
  4644. ! __EXTERN int stime __PROTO((long *));
  4645. ! __EXTERN long tell __PROTO((int));
  4646. ! __EXTERN int umask __PROTO((int));
  4647. ! __EXTERN int unlink __PROTO((const char *));
  4648. ! __EXTERN void usleep __PROTO((unsigned long));
  4649. ! __EXTERN int utime __PROTO((const char *, const struct utimbuf *));
  4650. ! __EXTERN int write __PROTO((int, const void *, unsigned int));
  4651. ! __EXTERN long _write __PROTO((int, const void *, unsigned long));
  4652. ! #define lwrite _write    /* backwards compatibility, likely go away */
  4653. ! __EXTERN int system __PROTO((const char *cmd));
  4654. ! __EXTERN char *getpass __PROTO((const char *prompt));
  4655.   
  4656.   #if defined(__cplusplus)
  4657.   }
  4658. --- 52,183 ----
  4659.   #define STDOUT_FILENO    1
  4660.   #define STDERR_FILENO    2
  4661.   
  4662. + /* sysconf() values */
  4663. + #define _SC_LAST    -1    /* max limit # for sysconf - NOT POSIX */
  4664. + #define _SC_MEMR_MAX    0    /* memory regions per process - NOT POSIX */
  4665. + #define _SC_ARG_MAX    1    /* max length of cmdln - NOT quite POSIX */
  4666. + #define _SC_OPEN_MAX    2    /* max # of open files per process - POSIX */
  4667. + #define _SC_NGROUPS_MAX    3    /* max # supp gids - POSIX */
  4668. + #define _SC_CHILD_MAX    4    /* max # processes/user - NOT quite POSIX */
  4669. + /* pathconf() values */
  4670. + #define _PC_LAST    -1    /* max limit # for pathconf - POSIX (!?) */
  4671. + #define _PC_IOPEN_MAX    0    /* internal limit on open files - NOT POSIX */
  4672. + #define _PC_LINK_MAX    1    /* max # of links - POSIX */
  4673. + #define _PC_PATH_MAX    2    /* max len of a full pathname - POSIX */
  4674. + #define _PC_NAME_MAX    3    /* max len of individual name - POSIX */
  4675. + #define _PC_PIPE_BUF    4    /* bytes written atomically to fifo - POSIX */
  4676. + #define _PC_NO_TRUNC    5    /* filename truncation - POSIX */
  4677.   #ifdef __MINT__
  4678. ! # ifndef _POSIX_SOURCE
  4679. ! /* flock() commands */
  4680.   #  define F_ULOCK    0    /* unlock */
  4681.   #  define F_LOCK    1    /* lock */
  4682.   #  define F_TLOCK    2    /* test and lock (non-blocking) */
  4683.   #  define F_TEST    3    /* test */
  4684. ! __EXTERN int        lockf    __PROTO((int, int, long));
  4685. ! # endif
  4686. ! #endif /* __MINT__ */
  4687. ! __EXTERN __EXITING _exit    __PROTO((int));
  4688. ! __EXTERN __EXITING abort    __PROTO((void));
  4689. ! __EXTERN int    access    __PROTO((const char *, int));
  4690. ! __EXTERN int    alarm    __PROTO((unsigned));
  4691. ! __EXTERN int    chdir    __PROTO((const char *));
  4692. ! __EXTERN int    chmod    __PROTO((const char *, int));
  4693. ! __EXTERN int    chown    __PROTO((const char *, int, int));
  4694. ! __EXTERN int    close    __PROTO((int));
  4695. ! __EXTERN int    creat    __PROTO((const char *, unsigned));
  4696. ! __EXTERN int    dup    __PROTO((int));
  4697. ! __EXTERN int    dup2    __PROTO((int, int));
  4698. ! __EXTERN int    fork    __PROTO((void));
  4699. ! __EXTERN char *    getcwd    __PROTO((char *, int));
  4700. ! __EXTERN char *    getwd    __PROTO((char *));
  4701. ! __EXTERN _GID_T    getegid    __PROTO((void));
  4702. ! __EXTERN _UID_T    geteuid    __PROTO((void));
  4703. ! __EXTERN _GID_T    getgid    __PROTO((void));
  4704. ! __EXTERN char *    getlogin    __PROTO((void));
  4705. ! #ifdef __MINT__
  4706. ! __EXTERN int    getopt    __PROTO((int, char **, const char *));
  4707. ! #else
  4708. ! __EXTERN int    getopt    __PROTO((int, char * const *, const char *));
  4709.   #endif
  4710. + __EXTERN int    getpgrp    __PROTO((void));
  4711. + __EXTERN int    getpid    __PROTO((void));
  4712. + __EXTERN int    getppid    __PROTO((void));
  4713. + __EXTERN _UID_T    getuid    __PROTO((void));
  4714. + __EXTERN int    isatty    __PROTO((int));
  4715. + __EXTERN int    kill    __PROTO((int, int));
  4716. + __EXTERN long    lseek    __PROTO((int, long, int));
  4717. + __EXTERN int    mkdir    __PROTO((const char *, unsigned));
  4718.   
  4719. ! /* be careful with this and Gcc, where strings are really constants */
  4720. ! __EXTERN char *    mktemp    __PROTO((char *));
  4721. ! #ifndef __SRC__
  4722. ! __EXTERN int    open    __PROTO((const char *, int, ...));
  4723. ! #else
  4724. ! __EXTERN int    open    __PROTO((const char *, int, unsigned));
  4725. ! #endif
  4726. ! __EXTERN int    pipe    __PROTO((int *));
  4727. ! __EXTERN long    pathconf __PROTO((const char *, int));
  4728. ! __EXTERN void    psignal    __PROTO((int, const char *));
  4729. ! __EXTERN int    rmdir    __PROTO((const char *));
  4730. ! __EXTERN int    read    __PROTO((int, void *, unsigned));
  4731. ! __EXTERN long    _read    __PROTO((int, void *, unsigned long));
  4732. ! #ifndef __MINT__
  4733.   #define lread _read /* backwards compatibility, likely to go away */
  4734.   #ifndef __SRC__
  4735.   __EXTERN void setlinebuf __PROTO((void *)); /* avoid pulling in stdio here */
  4736.   #else
  4737.   __EXTERN void setlinebuf __PROTO((FILE *)); /* stdio included in src */
  4738.   #endif
  4739. + #endif
  4740.   
  4741. ! __EXTERN int    setgid    __PROTO((int));
  4742. ! __EXTERN int    setuid    __PROTO((int));
  4743. ! __EXTERN int    setegid    __PROTO((int));
  4744. ! __EXTERN int    seteuid    __PROTO((int));
  4745. ! __EXTERN int    setregid __PROTO((int, int));
  4746. ! __EXTERN int    setreuid __PROTO((int, int));
  4747. ! __EXTERN int    setpgrp    __PROTO((int, int));
  4748. ! __EXTERN void    sleep    __PROTO((unsigned int));
  4749. ! __EXTERN int    stime    __PROTO((long *));
  4750. ! __EXTERN long    sysconf    __PROTO((int));
  4751. ! __EXTERN long    tell    __PROTO((int));
  4752. ! __EXTERN char *    ttyname    __PROTO((int));
  4753. ! __EXTERN int    umask    __PROTO((int));
  4754. ! __EXTERN int    unlink    __PROTO((const char *));
  4755. ! __EXTERN int    write    __PROTO((int, const void *, unsigned));
  4756. ! __EXTERN long    _write    __PROTO((int, const void *, unsigned long));
  4757. ! __EXTERN int system    __PROTO((const char *cmd));
  4758. ! __EXTERN char *getpass    __PROTO((const char *prompt));
  4759. ! __EXTERN void *lsbrk __PROTO((long)); /* these are too important not to list */
  4760. ! __EXTERN void *sbrk __PROTO((__SIZE_TYPEDEF__));
  4761. ! __EXTERN void *_sbrk __PROTO((long));
  4762. ! #ifndef __MINT__
  4763. ! #define lwrite _write    /* backwards compatibility, likely go away */
  4764. ! #endif
  4765. ! #ifndef _POSIX_SOURCE
  4766. ! __EXTERN int    vfork    __PROTO((void));
  4767. ! __EXTERN void    srandom    __PROTO((unsigned int seed));
  4768. ! __EXTERN char *    initstate __PROTO(( unsigned int seed, char *arg_state, int n ));
  4769. ! __EXTERN char *    setstate __PROTO((char *arg_state));
  4770. ! __EXTERN long     random    __PROTO((void));
  4771. ! __EXTERN void    usleep    __PROTO((unsigned long));
  4772. ! #endif
  4773. ! #if 0
  4774. ! /* see pwd.h */
  4775.   __EXTERN int setpwent __PROTO((void));
  4776.   __EXTERN void setpwfile __PROTO((char *));
  4777. ! #endif
  4778.   
  4779.   #if defined(__cplusplus)
  4780.   }
  4781. *** 1.9    1991/06/20 02:21:30
  4782. --- varargs.h    1992/06/03 15:27:09
  4783. ***************
  4784. *** 14,20 ****
  4785.   #include <compiler.h>
  4786.   #endif
  4787.   
  4788. ! #if defined(__cplusplus)
  4789.   extern "C" {
  4790.   #endif
  4791.   
  4792. --- 14,20 ----
  4793.   #include <compiler.h>
  4794.   #endif
  4795.   
  4796. ! #ifdef __cplusplus
  4797.   extern "C" {
  4798.   #endif
  4799.   
  4800. ***************
  4801. *** 65,71 ****
  4802.   
  4803.   #endif /* __GNUC__ */
  4804.   
  4805. ! #if defined(__cplusplus)
  4806.   }
  4807.   #endif
  4808.   
  4809. --- 65,71 ----
  4810.   
  4811.   #endif /* __GNUC__ */
  4812.   
  4813. ! #ifdef __cplusplus
  4814.   }
  4815.   #endif
  4816.   
  4817. *** 1.10    1992/03/22 22:05:23
  4818. --- vdibind.h    1992/06/03 15:27:10
  4819. ***************
  4820. *** 5,11 ****
  4821.   # include <compiler.h>
  4822.   #endif
  4823.       
  4824. ! #if defined(__cplusplus)
  4825.   extern "C" {
  4826.   #endif
  4827.   
  4828. --- 5,11 ----
  4829.   # include <compiler.h>
  4830.   #endif
  4831.       
  4832. ! #ifdef __cplusplus
  4833.   extern "C" {
  4834.   #endif
  4835.   
  4836. ***************
  4837. *** 267,273 ****
  4838.   #define GDOS_FSM  0x5F46534DL    /* '_FSM' */
  4839.   #define GDOS_FNT  0x5F464E54L    /* '_FNT' */
  4840.   
  4841. ! #if ((defined(__GNUC__)) && (!defined(__NO_INLINE__)))
  4842.   #define vq_vgdos()                \
  4843.   ({                        \
  4844.       register unsigned long ret __asm__("d0");    \
  4845. --- 267,273 ----
  4846.   #define GDOS_FSM  0x5F46534DL    /* '_FSM' */
  4847.   #define GDOS_FNT  0x5F464E54L    /* '_FNT' */
  4848.   
  4849. ! #ifdef __GNUC_INLINE__
  4850.   #define vq_vgdos()                \
  4851.   ({                        \
  4852.       register unsigned long ret __asm__("d0");    \
  4853. ***************
  4854. *** 424,430 ****
  4855.   __EXTERN void v_bez_off __PROTO((int handle));
  4856.   #endif /* ALTERNATE */
  4857.   
  4858. ! #if defined(__cplusplus)
  4859.   }
  4860.   #endif
  4861.   
  4862. --- 424,430 ----
  4863.   __EXTERN void v_bez_off __PROTO((int handle));
  4864.   #endif /* ALTERNATE */
  4865.   
  4866. ! #ifdef __cplusplus
  4867.   }
  4868.   #endif
  4869.   
  4870. *** 1.2    1991/06/20 02:21:30
  4871. --- wait.h    1992/06/03 15:27:10
  4872. ***************
  4873. *** 1,9 ****
  4874.   #ifndef _WAIT_H
  4875.   #define _WAIT_H
  4876.   
  4877. ! #ifdef __MINT__
  4878. ! #if defined(__cplusplus)
  4879.   extern "C" {
  4880.   #endif
  4881.   
  4882. --- 1,7 ----
  4883.   #ifndef _WAIT_H
  4884.   #define _WAIT_H
  4885.   
  4886. ! #ifdef __cplusplus
  4887.   extern "C" {
  4888.   #endif
  4889.   
  4890. ***************
  4891. *** 33,45 ****
  4892.   
  4893.   #define WIFSIGNALED(x)    ((x)._w.termsig != 0)
  4894.   #define WIFSTOPPED(x)    ((x)._w.termsig == WSTOPPED)
  4895.   
  4896.   #define WNOHANG        1
  4897.   #define WUNTRACED    2
  4898.   
  4899. ! #if defined(__cplusplus)
  4900.   }
  4901.   #endif
  4902.   
  4903. ! #endif /* __MINT__ */
  4904. ! #endif /* _WAIT_H */
  4905. --- 31,43 ----
  4906.   
  4907.   #define WIFSIGNALED(x)    ((x)._w.termsig != 0)
  4908.   #define WIFSTOPPED(x)    ((x)._w.termsig == WSTOPPED)
  4909. + #define WIFEXITED(x)    ((x)._w.termsig == 0)
  4910.   
  4911.   #define WNOHANG        1
  4912.   #define WUNTRACED    2
  4913.   
  4914. ! #ifdef __cplusplus
  4915.   }
  4916.   #endif
  4917.   
  4918. ! #endif
  4919. *** 1.4    1991/06/20 02:21:30
  4920. --- widget.h    1992/06/03 15:27:10
  4921. ***************
  4922. *** 27,33 ****
  4923.   #include <memory.h>
  4924.   #include <curses.h>
  4925.   
  4926. ! #if defined(__cplusplus)
  4927.   extern "C" {
  4928.   #endif
  4929.   
  4930. --- 27,33 ----
  4931.   #include <memory.h>
  4932.   #include <curses.h>
  4933.   
  4934. ! #ifdef __cplusplus
  4935.   extern "C" {
  4936.   #endif
  4937.   
  4938. ***************
  4939. *** 182,188 ****
  4940.   __EXTERN WIDGET widgetinput __PROTO((void));
  4941.   __EXTERN WIDGETTYPE  widgettype __PROTO((WIDGET));
  4942.   
  4943. ! #if defined(__cplusplus)
  4944.   }
  4945.   #endif
  4946.   
  4947. --- 182,188 ----
  4948.   __EXTERN WIDGET widgetinput __PROTO((void));
  4949.   __EXTERN WIDGETTYPE  widgettype __PROTO((WIDGET));
  4950.   
  4951. ! #ifdef __cplusplus
  4952.   }
  4953.   #endif
  4954.   
  4955. *** 1.6    1991/12/26 16:23:20
  4956. --- xbra.h    1992/06/03 15:27:11
  4957. ***************
  4958. *** 5,11 ****
  4959.   #include <compiler.h>
  4960.   #endif
  4961.   
  4962. ! #if defined(__cplusplus)
  4963.   extern "C" {
  4964.   #endif
  4965.   
  4966. --- 5,11 ----
  4967.   #include <compiler.h>
  4968.   #endif
  4969.   
  4970. ! #ifdef __cplusplus
  4971.   extern "C" {
  4972.   #endif
  4973.   
  4974. ***************
  4975. *** 44,50 ****
  4976.                  _JSR_OPCODE,    \
  4977.                  (void (*) __PROTO((void))) fn \
  4978.               }
  4979. ! #if defined(__cplusplus)
  4980.   }
  4981.   #endif
  4982.   #endif /* _XBRA_H */
  4983. --- 44,50 ----
  4984.                  _JSR_OPCODE,    \
  4985.                  (void (*) __PROTO((void))) fn \
  4986.               }
  4987. ! #ifdef __cplusplus
  4988.   }
  4989.   #endif
  4990.   #endif /* _XBRA_H */
  4991.